Function at 0x40aec2
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x42945b
call fcn.004279c0
sub esp, 0x88
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x50]
mov byte [eax], 1
call fcn.00403be3
lea ecx, [ebp - 0x28]
call fcn.004025be
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x50]
mov eax, dword [edi]
mov dword [ebp - 4], ebx
push eax
call fcn.00403e9a
test al, al
je 0x40b111
mov eax, dword [esi + 0x5c]
cmp eax, 2
je 0x40b0ff
cmp eax, ebx
jne 0x40afe6
mov ecx, edi
call fcn.00402a56
inc eax
mov ecx, edi
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.004084c0
lea ecx, [ebp - 0x28]
mov edx, eax
push ecx
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.0040259a
push dword [ebp - 0x5c]
mov byte [ebp - 4], 3
call fcn.004020df
pop ecx
lea edx, [ebp + 8]
push edx
mov dl, byte [esi + 0xd0]
neg dl
lea ebx, [esi + 0xc8]
mov eax, dword [esi + 0x2c]
sbb edx, edx
and edx, ebx
lea ebx, [esi + 0xb0]
push edx
mov dl, byte [esi + 0xbe]
neg dl
sbb edx, edx
mov ecx, dword [eax]
and edx, ebx
push edx
lea edx, [ebp - 0x50]
push dword [esi + 0x64]
push edx
lea edx, [ebp - 0x38]
push edx
push dword [ebp - 0x18]
push eax
call dword [ecx + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x40af87
mov esi, eax
jmp 0x40afa2
mov eax, dword [ebp + 8]
sub eax, ebx
je 0x40afda
dec eax
je 0x40afd3
dec eax
je 0x40afcf
dec eax
je 0x40afc8
dec eax
je 0x40afbf
dec eax
je 0x40afb8
mov esi, 0x80004005
push dword [ebp - 0x18]
call fcn.004020df
push dword [ebp - 0x28]
call fcn.004020df
pop ecx
jmp 0x40b109
mov esi, 0x80004004
jmp 0x40afa2
mov dword [esi + 0x5c], 3
jmp 0x40afda
mov dword [esi + 0x5c], 2
xor esi, esi
jmp 0x40afa2
mov dword [esi + 0x5c], 1
push dword [ebp - 0x18]
mov byte [ebp - 4], bl
call fcn.004020df
pop ecx
mov eax, dword [esi + 0x5c]
cmp eax, 3
jne 0x40b028
mov ecx, edi
call fcn.0040635f
test al, al
jne 0x40b01c
push edi
mov ecx, esi
push dword [0x42bbac]
call fcn.0040aa17
cmp eax, ebx
je 0x40b012
mov esi, eax
jmp 0x40b101
mov esi, 0x80004005
jmp 0x40b101
mov byte [esi + 0x160], 1
jmp 0x40b192
cmp eax, 4
jne 0x40b09c
push edi
lea ecx, [ebp - 0x18]
call fcn.00402691
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.0040635f
test al, al
jne 0x40b056
push edi
mov ecx, esi
push dword [0x42bbac]
call fcn.0040aa17
jmp 0x40b07c
mov ecx, dword [edi]
mov edx, dword [ebp - 0x18]
call fcn.004038c2
test al, al
jne 0x40b08f
call fcn.004045c7
lea ecx, [ebp - 0x18]
push edi
push ecx
mov ecx, esi
push dword [0x42bbb0]
push eax
call fcn.0040ab15
cmp eax, ebx
mov esi, eax
jne 0x40b087
mov esi, 0x80004005
push dword [ebp - 0x18]
jmp 0x40afa5
push dword [ebp - 0x18]
call fcn.004020df
jmp 0x40b191
mov eax, dword [ebp - 0x30]
mov ecx, dword [edi]
shr eax, 4
test al, 1
je 0x40b0be
call fcn.004038b5
test al, al
jne 0x40b192
push edi
push dword [0x42bbb8]
jmp 0x40b0f0
call fcn.00404357
test al, al
je 0x40b192
mov ecx, dword [edi]
call fcn.00403aa1
test al, al
jne 0x40b192
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40b192
push edi
push dword [0x42bbb4]
mov ecx, esi
call fcn.0040aa84
cmp eax, ebx
jne 0x40b00b
xor esi, esi
push dword [ebp - 0x28]
call fcn.004020df
pop ecx
mov eax, esi
jmp 0x40b1a2
mov ecx, dword [edi]
call fcn.00404c46
mov esi, eax
cmp esi, ebx
jl 0x40b192
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], bx
je 0x40b192
push edi
lea ecx, [ebp - 0x18]
call fcn.00402691
cmp esi, dword [ebp - 0x14]
mov byte [ebp - 4], 5
jae 0x40b143
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], esi
mov word [eax + esi*2], bx
lea ecx, [ebp - 0x94]
call fcn.00403be3
lea ecx, [ebp - 0x6c]
call fcn.004025be
push ebx
lea ecx, [ebp - 0x94]
push dword [ebp - 0x18]
mov byte [ebp - 4], 6
call fcn.00403e9a
test al, al
je 0x40b180
mov edx, dword [ebp - 0x74]
test dl, 1
je 0x40b180
mov ecx, dword [ebp - 0x18]
and edx, 0xfffffffe
call fcn.00403894
push dword [ebp - 0x6c]
call fcn.004020df
push dword [ebp - 0x18]
call fcn.004020df
pop ecx
pop ecx
mov eax, dword [ebp + 0xc]
push dword [ebp - 0x28]
mov byte [eax], bl
call fcn.004020df
pop ecx
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8