Function at 0x412f40
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4756f4
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x49ef38]
xor eax, esp
mov dword [esp + 0x11c], eax
push ebx
push esi
push edi
mov eax, dword [0x49ef38]
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 0x47dd5c
lea ecx, [esp + 0x18]
mov dword [esp + 0x13c], 0
call fcn.00406330
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 0x47dd5c
lea ecx, [esp + 0x14]
call fcn.00406330
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 0x4130a5
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
push eax
call fcn.00401530
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 0x413048
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 0x413070
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 0x41309e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
jmp 0x4132ad
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.004080a0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], 0
jl 0x41300c
push str._CDFS_
push eax
call dword [sym.imp.MSVCR90.dll_wcsstr]
add esp, 8
test eax, eax
je 0x41300c
mov ecx, dword [esp + 0x10]
sub eax, ecx
sar eax, 1
js 0x41300c
mov edx, dword [ecx - 0xc]
cmp eax, edx
mov edi, dword [sym.imp.MSVCR90.dll_wcschr]
jge 0x41312b
lea ecx, [ecx + eax*2]
push 0xa
push ecx
call edi
mov ecx, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x41312b
sub eax, ecx
sar eax, 1
jmp 0x41312e
or eax, 0xffffffff
lea esi, [eax + 1]
mov eax, dword [ecx - 0xc]
test esi, esi
jl 0x413159
cmp esi, eax
jge 0x413159
lea edx, [ecx + esi*2]
push 0xa
push edx
call edi
add esp, 8
test eax, eax
je 0x413159
sub eax, dword [esp + 0x10]
sar eax, 1
test eax, eax
jge 0x4131f8
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
push eax
call fcn.00401530
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 0x413199
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 0x4131c1
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 0x4132ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4132ab
sub eax, esi
push eax
push esi
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00407850
mov esi, dword [esp + 0x18]
cmp dword [esi - 0xc], 0
mov byte [esp + 0x138], 3
jg 0x413221
or eax, 0xffffffff
jmp 0x413236
push 0x3d
push esi
call edi
add esp, 8
test eax, eax
jne 0x413232
or eax, 0xffffffff
jmp 0x413236
sub eax, esi
sar eax, 1
add eax, 1
jns 0x413242
lea edx, [esp + 0x14]
push edx
jmp 0x413279
push eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
call fcn.00407ef0
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x13c], 4
call fcn.00404480
lea ecx, [esp + 0x20]
mov byte [esp + 0x138], 3
call fcn.00401e10
lea ecx, [esp + 0x14]
push ecx
mov esi, dword [esp + 0x20]
mov ecx, esi
call fcn.00402440
lea ecx, [esp + 0x18]
call fcn.00401e10
lea ecx, [esp + 0x10]
call fcn.00401e10
lea ecx, [esp + 0x14]
call fcn.00401e10
lea ecx, [esp + 0x144]
call fcn.00401e10
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.00471f66
add esp, 0x12c
ret 8