Function at 0x413120
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x475844
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x49eef8]
xor eax, esp
mov dword [esp + 0x11c], eax
push ebx
push esi
push edi
mov eax, dword [0x49eef8]
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 0x47dd68
lea ecx, [esp + 0x18]
mov dword [esp + 0x13c], 0
call fcn.004062a0
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 0x47dd68
lea ecx, [esp + 0x14]
call fcn.004062a0
mov ecx, dword [esp + 0x144]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocStringLen
push ecx
mov byte [esp + 0x154], 2
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x413285
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
push eax
call fcn.00401510
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 0x413228
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 0x413250
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 0x41327e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
jmp 0x41348d
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.00407fb0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], 0
jl 0x4131ec
push str._CDFS_
push eax
call dword [sym.imp.MSVCR90.dll_wcsstr]
add esp, 8
test eax, eax
je 0x4131ec
mov ecx, dword [esp + 0x10]
sub eax, ecx
sar eax, 1
js 0x4131ec
mov edx, dword [ecx - 0xc]
cmp eax, edx
mov edi, dword [sym.imp.MSVCR90.dll_wcschr]
jge 0x41330b
lea ecx, [ecx + eax*2]
push 0xa
push ecx
call edi
mov ecx, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x41330b
sub eax, ecx
sar eax, 1
jmp 0x41330e
or eax, 0xffffffff
lea esi, [eax + 1]
mov eax, dword [ecx - 0xc]
test esi, esi
jl 0x413339
cmp esi, eax
jge 0x413339
lea edx, [ecx + esi*2]
push 0xa
push edx
call edi
add esp, 8
test eax, eax
je 0x413339
sub eax, dword [esp + 0x10]
sar eax, 1
test eax, eax
jge 0x4133d8
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
push eax
call fcn.00401510
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 0x413379
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 0x4133a1
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 0x41348b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x41348b
sub eax, esi
push eax
push esi
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00407760
mov esi, dword [esp + 0x18]
cmp dword [esi - 0xc], 0
mov byte [esp + 0x138], 3
jg 0x413401
or eax, 0xffffffff
jmp 0x413416
push 0x3d
push esi
call edi
add esp, 8
test eax, eax
jne 0x413412
or eax, 0xffffffff
jmp 0x413416
sub eax, esi
sar eax, 1
add eax, 1
jns 0x413422
lea edx, [esp + 0x14]
push edx
jmp 0x413459
push eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
call fcn.00407e00
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x13c], 4
call fcn.004043f0
lea ecx, [esp + 0x20]
mov byte [esp + 0x138], 3
call fcn.00401e00
lea ecx, [esp + 0x14]
push ecx
mov esi, dword [esp + 0x20]
mov ecx, esi
call fcn.004023a0
lea ecx, [esp + 0x18]
call fcn.00401e00
lea ecx, [esp + 0x10]
call fcn.00401e00
lea ecx, [esp + 0x14]
call fcn.00401e00
lea ecx, [esp + 0x144]
call fcn.00401e00
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.00472076
add esp, 0x12c
ret 8