Function at 0x415e80
Capabilities:
Check if file exists
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x294
push ebx
push ebp
push esi
push edi
mov ebx, ecx
xor edi, edi
mov esi, 1
mov dword [ebx + 0x1820], edi
mov eax, dword [0x4256f0]
cmp eax, esi
jne 0x415eb1
lea eax, [ebx + 0x1018]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
jmp 0x415ebb
lea ecx, [ebx + 0x18]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, edi
je 0x4165f4
mov eax, dword [0x4256f0]
push edi
push 0x80
push 3
push edi
cmp eax, esi
push esi
push SysReAllocString
jne 0x415eea
lea edx, [ebx + 0x1018]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
jmp 0x415ef4
lea eax, [ebx + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
or esi, 0xffffffff
cmp ebp, esi
mov dword [esp + 0x20], ebp
je 0x4167a3
push ebp
mov ecx, ebx
call fcn.004169f0
cmp eax, edi
mov dword [ebx + 0x181c], eax
jne 0x415f26
push ebp
call fcn.00406bb0
add esp, 4
mov dword [ebx + 0x181c], eax
mov eax, dword [ebx + 0x181c]
cmp eax, edi
jne 0x415fa5
cmp dword [0x4256f0], 1
jne 0x415f4c
lea ecx, [esp + 0x44]
lea edx, [ebx + 0x1018]
push ecx
push edx
call sub.MSVCRT.dll__stati64
jmp 0x415f5a
lea eax, [esp + 0x44]
lea ecx, [ebx + 0x18]
push eax
push ecx
call sub.MSVCRT.dll__wstati64
add esp, 8
cmp eax, edi
jne 0x415f86
mov eax, dword [esp + 0x68]
cdq
mov dword [ebx + 0x1a90], eax
mov eax, dword [esp + 0x60]
mov dword [ebx + 0x1a94], edx
mov edx, dword [esp + 0x5c]
mov dword [ebx + 0x1a88], edx
mov dword [ebx + 0x1a8c], eax
mov dword [ebx + 0x10], esi
push ebp
mov dword [ebx + 0x14], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x294
ret 0xc
cmp eax, 6
je 0x415faf
cmp eax, 7
jne 0x41601e
lea edx, [ebx + 0x1018]
mov ecx, esi
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
test ecx, ecx
jle 0x41601e
cmp byte [edx + ecx], 0x2e
je 0x415fd3
dec ecx
test ecx, ecx
jg 0x415fc6
jmp 0x41601e
mov al, byte [ecx + ebx + 0x1019]
mov dl, 0x70
cmp al, 0x6d
jne 0x41601e
cmp byte [ecx + ebx + 0x101a], dl
jne 0x415ff3
cmp byte [ecx + ebx + 0x101b], 0x67
je 0x416014
cmp al, 0x6d
jne 0x41601e
cmp byte [ecx + ebx + 0x101a], dl
jne 0x41601e
cmp byte [ecx + ebx + 0x101b], 0x65
jne 0x41601e
cmp byte [ecx + ebx + 0x101c], 0x67
jne 0x41601e
mov dword [ebx + 0x181c], 2
mov eax, dword [ebx + 0x181c]
cmp eax, 6
je 0x4164d6
cmp eax, 7
je 0x4164d6
cmp eax, 8
je 0x4163cf
cmp eax, 9
je 0x4163cf
lea ecx, [esp + 0x94]
push 0
lea edx, [esp + 0x28]
push ecx
lea eax, [esp + 0x44]
push edx
lea ecx, [esp + 0x88]
push eax
push ecx
push ebp
mov ecx, ebx
call fcn.00412470
mov ecx, dword [esp + 0x3c]
mov esi, eax
mov eax, dword [esp + 0x40]
xor edx, edx
cmp esi, edx
mov dword [esp + 0x30], esi
je 0x416096
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
or edx, edi
jne 0x416094
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
xor edx, edx
cmp esi, 1
jne 0x4160b5
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
jmp 0x4160c5
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edx
lea edi, [ebx + 0x1824]
push 0x423cf0
lea edx, [esp + 0x78]
push edi
lea eax, [esp + 0x18]
push edx
lea ecx, [esp + 0x40]
push eax
push ecx
push ebp
mov ecx, ebx
call fcn.004159f0
test esi, esi
mov dword [esp + 0x2c], eax
mov ebp, 1
je 0x416148
test eax, eax
je 0x416148
cmp dword [0x4256f0], ebp
jne 0x416114
lea edx, [esp + 0x44]
lea eax, [ebx + 0x1018]
push edx
push eax
call sub.MSVCRT.dll__stati64
jmp 0x416122
lea ecx, [esp + 0x44]
lea edx, [ebx + 0x18]
push ecx
push edx
call sub.MSVCRT.dll__wstati64
add esp, 8
test eax, eax
jne 0x416130
mov eax, dword [esp + 0x68]
cdq
jmp 0x416138
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
cmp edx, dword [esp + 0x78]
ja 0x416148
jb 0x416146
cmp eax, dword [esp + 0x74]
jae 0x416148
xor ebp, ebp
mov eax, dword [esp + 0x30]
xor esi, esi
test eax, eax
jne 0x416191
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x416191
mov eax, dword [ebx + 0x181c]
cmp eax, 3
je 0x41616a
cmp eax, 4
jne 0x416191
mov edx, dword [esp + 0x20]
push 0
lea eax, [esp + 0x90]
push edi
lea ecx, [esp + 0x8c]
push eax
push ecx
push edx
mov ecx, ebx
call fcn.004124c0
mov esi, eax
dec esi
neg esi
sbb esi, esi
inc esi
mov eax, dword [esp + 0x2ac]
test eax, eax
je 0x4162c0
test ebp, ebp
je 0x4161fb
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4161fb
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x20]
push eax
push ecx
push edx
mov ecx, ebx
call fcn.00411e30
mov ecx, dword [ebx + 0x1a78]
mov dword [ebx + 0x1820], eax
test ecx, ecx
je 0x4161e7
push eax
mov eax, dword [ebx + 0x1a7c]
push eax
push 0x424118
call fcn.0040b080
add esp, 0xc
mov eax, dword [ebx + 0x1820]
test eax, eax
jne 0x416245
mov dword [ebx + 0x1ab0], 0
mov eax, dword [ebx + 0x1820]
test eax, eax
jne 0x416245
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x416245
push edi
mov ecx, ebx
call fcn.00415cc0
mov ecx, dword [ebx + 0x1a78]
mov dword [ebx + 0x1820], eax
test ecx, ecx
je 0x41623a
mov ecx, dword [ebx + 0x1a7c]
push eax
push ecx
push 0x4240fc
call fcn.0040b080
add esp, 0xc
or ebp, 0xffffffff
mov dword [ebx + 0x10], ebp
mov dword [ebx + 0x14], ebp
jmp 0x416248
or ebp, 0xffffffff
mov eax, dword [ebx + 0x1820]
test eax, eax
jne 0x4162c0
test esi, esi
je 0x416264
push edi
mov ecx, ebx
call fcn.00415cc0
mov dword [ebx + 0x1820], eax
cmp dword [0x4256f0], 1
jne 0x416280
lea edx, [esp + 0x44]
lea eax, [ebx + 0x1018]
push edx
push eax
call sub.MSVCRT.dll__stati64
jmp 0x41628e
lea ecx, [esp + 0x44]
lea edx, [ebx + 0x18]
push ecx
push edx
call sub.MSVCRT.dll__wstati64
add esp, 8
test eax, eax
jne 0x4162c0
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x60]
cdq
mov dword [ebx + 0x1a90], eax
mov eax, dword [esp + 0x5c]
mov dword [ebx + 0x10], ebp
mov dword [ebx + 0x1a88], eax
mov dword [ebx + 0x1a94], edx
mov dword [ebx + 0x14], ebp
mov dword [ebx + 0x1a8c], ecx
mov eax, dword [esp + 0x30]
xor ebp, ebp
cmp eax, ebp
je 0x416313
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x24]
mov dword [ebx + 0x10], edx
mov edx, dword [esp + 0x28]
mov dword [ebx + 0x14], eax
mov eax, dword [esp + 0x7c]
mov dword [ebx + 0x1a88], ecx
mov ecx, dword [esp + 0x80]
mov dword [ebx + 0x1a90], eax
mov dword [ebx + 0x1a94], ecx
mov ecx, dword [esp + 0x20]
push ecx
mov dword [ebx + 0x1a8c], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x416638
cmp dword [esp + 0x2c], ebp
je 0x41635f
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0x10], edx
mov edx, dword [esp + 0x14]
mov dword [ebx + 0x14], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 0x1a88], ecx
mov ecx, dword [esp + 0x38]
mov dword [ebx + 0x1a90], eax
mov dword [ebx + 0x1a94], ecx
mov ecx, dword [esp + 0x20]
push ecx
mov dword [ebx + 0x1a8c], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x416638
cmp dword [0x4256f0], 1
jne 0x41637b
lea edx, [esp + 0x44]
lea eax, [ebx + 0x1018]
push edx
push eax
call sub.MSVCRT.dll__stati64
jmp 0x416389
lea ecx, [esp + 0x44]
lea edx, [ebx + 0x18]
push ecx
push edx
call sub.MSVCRT.dll__wstati64
add esp, 8
cmp eax, ebp
jne 0x4165e7
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x60]
cdq
mov dword [ebx + 0x1a90], eax
mov eax, dword [esp + 0x5c]
mov dword [ebx + 0x1a88], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x1a8c], ecx
mov dword [ebx + 0x14], ecx
mov ecx, dword [esp + 0x20]
mov dword [ebx + 0x1a94], edx
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x416638
lea esi, [ebx + 0x1824]
push 0x423e6c
lea eax, [esp + 0x38]
push esi
lea ecx, [esp + 0x20]
push eax
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x1c]
push ecx
xor edi, edi
push edx
push eax
mov ecx, ebx
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
call fcn.004159f0
cmp eax, edi
je 0x416477
cmp dword [esp + 0x2ac], edi
je 0x41644a
push esi
mov ecx, ebx
call fcn.00415cc0
mov ecx, dword [ebx + 0x1a78]
mov dword [ebx + 0x1820], eax
cmp ecx, edi
je 0x41644a
mov ecx, dword [ebx + 0x1a7c]
push eax
push ecx
push 0x4240e0
call fcn.0040b080
add esp, 0xc
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov dword [ebx + 0x1a88], edx
mov edx, dword [esp + 0x14]
mov dword [ebx + 0x1a90], ecx
mov dword [ebx + 0x1a8c], eax
mov dword [ebx + 0x1a94], edx
jmp 0x4165dc
cmp dword [0x4256f0], 1
jne 0x416493
lea eax, [esp + 0x44]
lea ecx, [ebx + 0x1018]
push eax
push ecx
call sub.MSVCRT.dll__stati64
jmp 0x4164a1
lea edx, [esp + 0x44]
lea eax, [ebx + 0x18]
push edx
push eax
call sub.MSVCRT.dll__wstati64
add esp, 8
cmp eax, edi
jne 0x4165dc
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x68]
mov dword [ebx + 0x1a88], ecx
mov dword [ebx + 0x1a8c], edx
cdq
mov dword [ebx + 0x1a90], eax
mov dword [ebx + 0x1a94], edx
jmp 0x4165dc
lea eax, [esp + 0x9c]
push 0x423e20
push eax
call sub.MSVCRT.dll_wcscpy
add esp, 8
lea ecx, [esp + 0x9c]
lea esi, [ebx + 0x1824]
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x24]
push esi
lea eax, [esp + 0x18]
push edx
push eax
xor edi, edi
push ecx
mov ecx, ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
call fcn.004124c0
cmp eax, edi
je 0x416586
cmp dword [esp + 0x2ac], edi
je 0x41655c
push esi
mov ecx, ebx
call fcn.00415cc0
mov ecx, dword [ebx + 0x1a78]
mov dword [ebx + 0x1820], eax
cmp ecx, edi
je 0x41655c
mov edx, dword [ebx + 0x1a7c]
push eax
push edx
push 0x4240e0
call fcn.0040b080
add esp, 0xc
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0x1a88], eax
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x1a90], edx
mov dword [ebx + 0x1a8c], ecx
mov dword [ebx + 0x1a94], eax
jmp 0x4165dc
cmp dword [0x4256f0], 1
jne 0x4165a2
lea ecx, [esp + 0x44]
lea edx, [ebx + 0x1018]
push ecx
push edx
call sub.MSVCRT.dll__stati64
jmp 0x4165b0
lea eax, [esp + 0x44]
lea ecx, [ebx + 0x18]
push eax
push ecx
call sub.MSVCRT.dll__wstati64
add esp, 8
cmp eax, edi
jne 0x4165dc
mov eax, dword [esp + 0x68]
cdq
mov dword [ebx + 0x1a90], eax
mov eax, dword [esp + 0x60]
mov dword [ebx + 0x1a94], edx
mov edx, dword [esp + 0x5c]
mov dword [ebx + 0x1a88], edx
mov dword [ebx + 0x1a8c], eax
or eax, 0xffffffff
xor ebp, ebp
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], eax
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x416638
mov eax, dword [esp + 0x2a8]
cmp eax, edi
jne 0x41660f
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x294
ret 0xc
mov dword [ebx + 0x181c], eax
or eax, 0xffffffff
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x1a88], edi
mov dword [ebx + 0x1a90], edi
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x1a8c], edi
mov dword [ebx + 0x1a94], edi
xor ebp, ebp
mov eax, dword [ebx + 0x1820]
mov esi, 1
cmp eax, ebp
je 0x41675c
cmp dword [esp + 0x2ac], ebp
je 0x41675c
cmp dword [esp + 0x2b0], ebp
jne 0x416765
mov edx, dword [ebx + 4]
mov eax, dword [ebx + 0x1a44]
cmp edx, eax
jge 0x416732
mov eax, dword [ebx]
xor edi, edi
cmp eax, ebp
jle 0x4166a5
mov eax, dword [ebx + 8]
mov esi, dword [eax + edi*4]
cmp esi, ebp
je 0x41669e
mov ecx, esi
call fcn.0040b170
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov ecx, dword [ebx + 8]
add esp, 4
mov dword [ecx + edi*4], ebp
mov eax, dword [ebx]
inc edi
cmp edi, eax
jl 0x41667e
mov eax, dword [ebx + 8]
cmp eax, ebp
je 0x4166b8
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [ebx + 8], ebp
mov esi, dword [ebx + 0x1a44]
lea edx, [esi*4]
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, ebp
mov dword [ebx + 8], eax
je 0x4166e7
xor eax, eax
cmp esi, ebp
jle 0x4166e7
mov ecx, dword [ebx + 8]
inc eax
cmp eax, esi
mov dword [ecx + eax*4 - 4], ebp
jl 0x4166db
cmp dword [ebx + 4], 0x100
jle 0x416709
mov eax, dword [ebx + 0x1a80]
cmp eax, ebp
je 0x416709
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [ebx + 0x1a80], ebp
shl esi, 4
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, 0x400
mov esi, 0x422c68
mov edi, eax
mov dword [ebx + 0x1a80], eax
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebx + 0x1a44]
add esp, 4
mov dword [ebx + 4], edx
mov ecx, ebx
call fcn.00410e50
mov esi, eax
mov eax, dword [ebx + 0x1a78]
cmp eax, ebp
je 0x4167a3
mov eax, dword [ebx + 0x1a7c]
push esi
push eax
push 0x4240c0
call fcn.0040b080
add esp, 0xc
jmp 0x416786
cmp dword [esp + 0x2b0], ebp
je 0x416786
or eax, 0xffffffff
mov dword [ebx + 0x1a90], ebp
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x1a88], ebp
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x1a94], ebp
mov dword [ebx + 0x1a8c], ebp
cmp dword [ebx + 0x1a78], ebp
je 0x4167a3
mov ecx, dword [ebx + 0x1a7c]
push esi
push ecx
push 0x4240e0
call fcn.0040b080
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x294
ret 0xc