Function at 0x403fb4
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x425024
call fcn.00424220
sub esp, 0x4c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov ecx, edi
call fcn.00404b59
mov ebx, eax
test ebx, ebx
jl 0x404188
cmp word [edi + ebx*2 + 2], 0
je 0x404188
lea eax, [edi + ebx*2]
lea ecx, [ebp - 0x30]
push eax
call fcn.004025e4
and dword [ebp - 4], 0
push edi
lea ecx, [ebp - 0x24]
call fcn.004025e4
cmp ebx, dword [ebp - 0x20]
mov byte [ebp - 4], 1
jae 0x404013
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], ebx
and word [eax + ebx*2], 0
mov eax, dword [ebp - 0x2c]
cmp eax, 6
jbe 0x404030
mov ecx, dword [ebp - 0x30]
mov edx, 0x427690
lea ecx, [ecx + eax*2 - 0xc]
call fcn.004021ec
test al, al
jne 0x40403d
push str.:_DATA
lea ecx, [ebp - 0x30]
call fcn.004027d3
mov ecx, dword [ebp - 0x24]
call fcn.00404a64
test al, al
mov eax, dword [ebp - 0x24]
je 0x404082
cmp ebx, 2
je 0x40405d
cmp ebx, 3
jne 0x404082
cmp word [eax + 4], 0x5c
jne 0x404082
mov ecx, esi
call fcn.00403f82
mov eax, dword [esi + 0x28]
lea ecx, [esi + 0x28]
xor edi, edi
cmp ebx, 2
mov dword [ecx + 4], edi
mov word [eax], di
jne 0x404094
lea eax, [ebp - 0x24]
push eax
call fcn.004026f9
jmp 0x404094
push eax
mov ecx, esi
call fcn.00403fb4
test al, al
je 0x404176
xor edi, edi
and word [esi + 0x20], 0xfbef
or dword [ebp - 0x40], 0xffffffff
mov dword [esi], edi
mov dword [esi + 4], edi
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x3c]
push eax
mov byte [ebp - 4], 2
call fcn.00402627
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 3
call fcn.004025a0
lea eax, [ebp + 0xb]
lea ecx, [ebp - 0x40]
push eax
lea eax, [ebp - 0x58]
push eax
mov byte [ebp - 4], 4
call fcn.00403f42
test al, al
je 0x40410b
cmp byte [ebp + 0xb], 0
je 0x404103
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x58]
call fcn.0040212e
test al, al
jne 0x40410f
push dword [ebp - 0x58]
mov byte [ebp - 4], 3
call fcn.004020e1
pop ecx
lea ecx, [ebp - 0x58]
call fcn.004025a0
jmp 0x4040bf
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor bl, bl
jmp 0x404145
mov ecx, dword [ebp - 0x54]
cmp ecx, 7
jbe 0x404128
lea eax, [ecx - 6]
cmp eax, ecx
jae 0x404128
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x54], eax
mov word [ecx + eax*2], di
lea eax, [ebp - 0x58]
lea ecx, [esi + 0x28]
push eax
call fcn.0040281f
mov eax, dword [ebp - 0x48]
mov byte [esi + 0x24], 1
mov dword [esi], eax
mov eax, dword [ebp - 0x44]
mov dword [esi + 4], eax
mov bl, 1
push dword [ebp - 0x58]
call fcn.004020e1
push dword [ebp - 0x3c]
call fcn.004020e1
pop ecx
pop ecx
lea ecx, [ebp - 0x40]
call fcn.00403d2c
push dword [ebp - 0x24]
call fcn.004020e1
push dword [ebp - 0x30]
call fcn.004020e1
pop ecx
pop ecx
jmp 0x404349
push dword [ebp - 0x24]
call fcn.004020e1
push dword [ebp - 0x30]
call fcn.004020e1
pop ecx
pop ecx
or dword [ebp - 0x10], 0xffffffff
push esi
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 5
call fcn.00403d4c
test al, al
je 0x4041a8
mov bl, 1
jmp 0x404341
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov dword [ebp - 0x18], eax
je 0x4041d0
cmp eax, 0x35
je 0x4041d0
cmp eax, 0x43
je 0x4041d0
cmp eax, 0x7b
je 0x4041d0
cmp eax, 0xa1
jne 0x40433f
mov ecx, edi
xor ebx, ebx
call fcn.00404a8d
test al, al
je 0x4041e0
push 4
pop ebx
mov ax, word [edi]
cmp ax, 0x5c
je 0x4041ef
cmp ax, 0x2f
jne 0x40422b
cmp word [edi + 2], 0
jne 0x40422b
mov ecx, edi
call fcn.00403fa5
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40433f
test bl, 0x10
je 0x40433f
mov ecx, esi
call fcn.00403f82
mov eax, dword [esi + 0x28]
and dword [esi + 0x2c], 0
and word [eax], 0
mov dword [esi + 0x20], ebx
jmp 0x4041a1
lea ecx, [edi + ebx*2]
mov dword [ebp + 8], ecx
call fcn.00404853
test al, al
je 0x40428f
cmp word [edi + ebx*2 + 6], 0
jne 0x40428f
mov ecx, edi
call fcn.00403fa5
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40433f
test bl, 0x10
je 0x40433f
mov ecx, esi
call fcn.00403f82
push dword [ebp + 8]
mov dword [esi + 0x20], ebx
add esi, 0x28
mov ecx, esi
call fcn.00402695
push 2
pop eax
cmp dword [esi + 4], eax
jbe 0x4041a1
mov dword [esi + 4], eax
mov eax, dword [esi]
and word [eax + 4], 0
jmp 0x4041a1
mov ecx, edi
call fcn.00404a07
test eax, eax
jbe 0x40433f
cmp word [edi + eax*2], 0
lea ecx, [edi + eax*2]
mov dword [ebp - 0x14], ecx
je 0x40433f
call fcn.0040480b
test eax, eax
jge 0x40433f
push edi
lea ecx, [ebp - 0x3c]
call fcn.004025e4
push 0x5c
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.00401dd8
push 0x2a
lea ecx, [ebp - 0x3c]
call fcn.00401dd8
and byte [ebp + 0xb], 0
push esi
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x10]
call fcn.00403d4c
test al, al
je 0x404314
mov eax, dword [esi + 0x28]
lea ebx, [esi + 0x28]
push 0x427648
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
pop ecx
test eax, eax
pop ecx
jne 0x404310
push dword [ebp - 0x14]
mov ecx, ebx
jmp 0x40437a
mov byte [ebp + 0xb], 1
mov ecx, edi
call fcn.00403fa5
cmp byte [ebp + 0xb], 0
mov ebx, eax
jne 0x40435c
cmp ebx, 0xffffffff
je 0x40432d
test bl, 0x10
jne 0x40435c
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x3c]
call fcn.004020e1
pop ecx
xor bl, bl
lea ecx, [ebp - 0x10]
call fcn.00403d2c
mov al, bl
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
mov ecx, esi
call fcn.00403f82
cmp ebx, 0xffffffff
je 0x40436d
mov dword [esi + 0x20], ebx
jmp 0x404374
mov dword [esi + 0x20], 0x10
push dword [ebp - 0x14]
lea ecx, [esi + 0x28]
call fcn.00402695
push dword [ebp - 0x3c]
call fcn.004020e1
pop ecx
lea ecx, [ebp - 0x10]
call fcn.00403d2c
mov al, 1
jmp 0x40434b