Function at 0x4040e8
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421a37
mov eax, dword fs:[0]
push eax
mov eax, 0x1470
call fcn.0041fed0
mov eax, dword [0x42d004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1444], edx
mov dword [ebp - 0x1448], ecx
and dword [ebp - 4], 0
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x144c], 1
cmp esi, ebx
je 0x4043ca
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
push esi
lea ecx, [ebp - 0x1440]
call fcn.00404dd9
mov edx, 0x100
mov byte [ebp - 4], 1
cmp dword [ebp - 0x142c], 8
lea ecx, [ebp - 0xc28]
push edx
push ecx
push edx
lea ecx, [ebp - 0x418]
push ecx
push edx
lea ecx, [ebp - 0x618]
push ecx
push 0
lea eax, [ebp - 0x1440]
cmovae eax, dword [ebp - 0x1440]
push 0
push eax
call fcn.0040c246
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x618]
push eax
push dword [ebp - 0x1448]
lea eax, [ebp - 0x820]
push 0x4299e4
push eax
call edi
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x618]
push eax
push dword [ebp - 0x1448]
lea eax, [ebp - 0xa28]
push str._s_s123.tmp
push eax
call edi
add esp, 0x4c
lea eax, [ebp - 0x820]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404249
cmp dword [ebp - 0x142c], 8
lea eax, [ebp - 0x1440]
cmovae eax, dword [ebp - 0x1440]
push eax
push dword [ebp - 0x1444]
lea eax, [ebp - 0x218]
push str._sPatch_s
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x218]
lea ecx, [ebp - 0x1464]
push eax
call fcn.004059d9
lea ecx, [ebp - 0x1464]
mov byte [ebp - 4], 2
call fcn.0040344f
lea ecx, [ebp - 0x1464]
call fcn.00404fcb
jmp 0x4043b0
push ecx
lea eax, [ebp - 0xa28]
push eax
lea ecx, [ebp - 0x147c]
call fcn.004059d9
push ecx
lea eax, [ebp - 0x820]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x1464]
call fcn.004059d9
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x147c]
cmp dword [ebp - 0x1468], 8
lea eax, [ebp - 0x1464]
cmovae ecx, dword [ebp - 0x147c]
cmp dword [ebp - 0x1450], 8
push ecx
cmovae eax, dword [ebp - 0x1464]
push eax
call fcn.00407d1a
test eax, eax
jne 0x4043ec
lea ecx, [ebp - 0x1464]
call fcn.00404fcb
lea ecx, [ebp - 0x147c]
mov byte [ebp - 4], 1
call fcn.00404fcb
cmp dword [ebp - 0x142c], 8
lea eax, [ebp - 0x1440]
cmovae eax, dword [ebp - 0x1440]
push eax
push dword [ebp - 0x1444]
lea eax, [ebp - 0x218]
push str._sPatch_s
push eax
call edi
lea eax, [ebp - 0x820]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xa28]
push eax
push dword [ebp - 0x1444]
lea eax, [ebp - 0x1428]
push str._sOctodiffOctodiff.exe_patch___s____s____s_
push eax
call edi
lea ecx, [ebp - 0x1428]
call fcn.00403d3d
add esp, 0x24
lea eax, [ebp - 0xa28]
lea ecx, [ebp - 0x1464]
push eax
call fcn.004059d9
lea ecx, [ebp - 0x1464]
mov byte [ebp - 4], 5
call fcn.0040344f
lea ecx, [ebp - 0x1464]
mov byte [ebp - 4], 1
call fcn.00404fcb
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x1464]
call fcn.004059d9
lea ecx, [ebp - 0x1464]
mov byte [ebp - 4], 6
call fcn.0040344f
lea ecx, [ebp - 0x1464]
call fcn.00404fcb
mov ecx, dword [ebp - 0x144c]
mov eax, ecx
inc ecx
mov dword [ebp - 0x144c], ecx
lea ecx, [ebp - 0x418]
push ecx
lea ecx, [ebp - 0x618]
push ecx
push eax
push 0x429a84
call fcn.00401006
add esp, 0x10
lea ecx, [ebp - 0x1440]
mov byte [ebp - 4], 0
call fcn.00404fcb
add esi, 0x18
cmp esi, ebx
jne 0x404148
lea ecx, [ebp + 8]
call fcn.00404f4b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040842b
leave
ret
lea ecx, [ebp - 0x147c]
mov edx, eax
push ecx
lea ecx, [ebp - 0x1464]
push ecx
call fcn.004029fe
int3