Function at 0x416760
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x478e54
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x4a6eb0]
xor eax, esp
mov dword [esp + 0x11c], eax
push ebx
push esi
push edi
mov eax, dword [0x4a6eb0]
xor eax, esp
push eax
lea eax, [esp + 0x130]
mov dword fs:[0], eax
mov edi, dword [esp + 0x140]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], 0
push 0x481de0
lea ecx, [esp + 0x18]
mov dword [esp + 0x13c], 0
call fcn.00406310
push 0x104
lea eax, [esp + 0x2c]
push 0
mov bl, 1
push eax
mov byte [esp + 0x144], bl
mov dword [esp + 0x30], 0x104
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x481de0
lea ecx, [esp + 0x14]
call fcn.00406310
mov ecx, dword [esp + 0x144]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push ecx
mov byte [esp + 0x154], 2
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4168c5
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
push eax
call fcn.00401520
add eax, 0x10
mov dword [edi], eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
mov byte [esp + 0x13c], bl
add esp, 4
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x416868
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x138], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416890
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x144]
add eax, 0xfffffff0
mov dword [esp + 0x138], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4168be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
jmp 0x416acd
mov edx, dword [esp + 0x24]
push 0
lea ecx, [esp + 0x28]
push ecx
push edx
lea eax, [esp + 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x14]
call fcn.00408800
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], 0
jl 0x41682c
push str._CDFS_
push eax
call dword [sym.imp.MSVCR90.dll_wcsstr]
add esp, 8
test eax, eax
je 0x41682c
mov ecx, dword [esp + 0x10]
sub eax, ecx
sar eax, 1
js 0x41682c
mov edx, dword [ecx - 0xc]
cmp eax, edx
mov edi, dword [sym.imp.MSVCR90.dll_wcschr]
jge 0x41694b
lea ecx, [ecx + eax*2]
push 0xa
push ecx
call edi
mov ecx, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x41694b
sub eax, ecx
sar eax, 1
jmp 0x41694e
or eax, 0xffffffff
lea esi, [eax + 1]
mov eax, dword [ecx - 0xc]
test esi, esi
jl 0x416979
cmp esi, eax
jge 0x416979
lea edx, [ecx + esi*2]
push 0xa
push edx
call edi
add esp, 8
test eax, eax
je 0x416979
sub eax, dword [esp + 0x10]
sar eax, 1
test eax, eax
jge 0x416a18
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
push eax
call fcn.00401520
mov esi, dword [esp + 0x20]
add eax, 0x10
mov dword [esi], eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x138], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4169b9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x138], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4169e1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x144]
add eax, 0xfffffff0
mov dword [esp + 0x138], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416acb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x416acb
sub eax, esi
push eax
push esi
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00407ca0
mov esi, dword [esp + 0x18]
cmp dword [esi - 0xc], 0
mov byte [esp + 0x138], 3
jg 0x416a41
or eax, 0xffffffff
jmp 0x416a56
push 0x3d
push esi
call edi
add esp, 8
test eax, eax
jne 0x416a52
or eax, 0xffffffff
jmp 0x416a56
sub eax, esi
sar eax, 1
add eax, 1
jns 0x416a62
lea edx, [esp + 0x14]
push edx
jmp 0x416a99
push eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
call fcn.004085c0
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x13c], 4
call fcn.00404460
lea ecx, [esp + 0x20]
mov byte [esp + 0x138], 3
call fcn.00450df0
lea ecx, [esp + 0x14]
push ecx
mov esi, dword [esp + 0x20]
mov ecx, esi
call fcn.00402410
lea ecx, [esp + 0x18]
call fcn.00450df0
lea ecx, [esp + 0x10]
call fcn.00450df0
lea ecx, [esp + 0x14]
call fcn.00450df0
lea ecx, [esp + 0x144]
call fcn.00450df0
mov eax, esi
mov ecx, dword [esp + 0x130]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.004764f6
add esp, 0x12c
ret 8