Function at 0x401f00
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
mov eax, dword [esi + 0x28]
mov dword [esp + 0x10], eax
test byte [eax], 8
jne 0x401f27
pop edi
pop esi
pop ebp
mov dword [0x57defc], 0x6f
xor eax, eax
pop ebx
pop ecx
ret
lea eax, [esi + 0x10]
push eax
push esi
call fcn.00402400
add esp, 8
test eax, eax
je 0x40216f
lea eax, [esi + 0x12]
push eax
push esi
call fcn.00402400
add esp, 8
test eax, eax
je 0x40216f
lea eax, [esi + 0x14]
push eax
push esi
call fcn.00402400
add esp, 8
test eax, eax
je 0x40216f
lea eax, [esi + 0x16]
push eax
push esi
call fcn.00402400
add esp, 8
test eax, eax
je 0x40216f
mov eax, dword [esi + 0x28]
xor ebp, ebp
mov ecx, dword [eax + 0x24]
cmp ecx, ebp
je 0x401f96
lea edx, [esp + 0x18]
push 1
push edx
push esi
call ecx
add esp, 0xc
jmp 0x401fac
mov eax, dword [eax + 0x20]
lea ecx, [esp + 0x18]
push eax
push 1
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x401fc3
pop edi
pop esi
pop ebp
mov dword [0x57defc], 0x66
xor eax, eax
pop ebx
pop ecx
ret
mov al, byte [esp + 0x18]
mov dl, al
mov cl, al
and edx, 7
and cl, 0x40
inc edx
mov edi, edx
xor dx, dx
mov dl, cl
test al, 0x80
mov eax, dword [esi + 0x1c]
mov word [esi + 0x18], dx
je 0x4020b2
cmp eax, ebp
je 0x401ffa
cmp dword [esi + 0x20], ebp
jne 0x401ffa
push eax
call fcn.005116b0
add esp, 4
mov eax, 1
mov ecx, edi
shl eax, cl
push ebp
push eax
call fcn.00406820
add esp, 8
cmp eax, ebp
mov dword [esi + 0x1c], eax
je 0x402165
mov ecx, dword [eax]
xor ebx, ebx
cmp ecx, ebp
jle 0x4020c2
xor edi, edi
mov eax, dword [esi + 0x28]
mov ecx, dword [eax + 0x24]
cmp ecx, ebp
je 0x40203f
lea edx, [esp + 0x18]
push 3
push edx
push esi
call ecx
add esp, 0xc
jmp 0x402055
mov eax, dword [eax + 0x20]
lea ecx, [esp + 0x18]
push eax
push 3
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 3
jne 0x402091
mov edx, dword [esi + 0x1c]
mov cl, byte [esp + 0x18]
inc ebx
add edi, 3
mov eax, dword [edx + 8]
mov byte [eax + edi - 3], cl
mov edx, dword [esi + 0x1c]
mov cl, byte [esp + 0x19]
mov eax, dword [edx + 8]
mov byte [eax + edi - 2], cl
mov edx, dword [esi + 0x1c]
mov cl, byte [esp + 0x1a]
mov eax, dword [edx + 8]
mov byte [eax + edi - 1], cl
mov edx, dword [esi + 0x1c]
cmp ebx, dword [edx]
jl 0x402026
jmp 0x4020c2
mov eax, dword [esi + 0x1c]
push eax
call fcn.005116b0
add esp, 4
mov dword [0x57defc], 0x66
mov dword [esi + 0x1c], ebp
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
cmp eax, ebp
je 0x4020c2
push eax
call fcn.005116b0
add esp, 4
mov dword [esi + 0x1c], ebp
mov eax, dword [esi + 0x20]
cmp eax, ebp
je 0x4020dd
mov ecx, dword [esi + 0xc]
inc ecx
shl ecx, 5
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
jmp 0x4020e8
push 0x20
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
cmp eax, ebp
mov dword [esi + 0x20], eax
je 0x402165
mov edi, dword [esi + 0xc]
mov edx, eax
mov eax, dword [esi + 0x10]
shl edi, 5
add edi, edx
mov edx, edi
mov dword [edx], eax
mov ecx, dword [esi + 0x14]
mov dword [edx + 4], ecx
mov eax, dword [esi + 0x18]
mov dword [edx + 8], eax
mov ecx, dword [esi + 0x1c]
mov dword [edx + 0xc], ecx
mov eax, dword [esi + 0x1c]
cmp eax, ebp
je 0x40212f
mov edx, dword [eax + 8]
mov eax, dword [eax]
push edx
push eax
call fcn.00406820
add esp, 8
cmp eax, ebp
mov dword [edi + 0xc], eax
je 0x402165
mov dword [edi + 0x10], ebp
mov dword [edi + 0x18], ebp
mov dword [edi + 0x1c], ebp
mov edx, dword [esi + 0xc]
movsx ecx, word [esi + 0x14]
inc edx
mov eax, dword [esp + 0x10]
mov dword [esi + 0xc], edx
push esi
movsx edx, word [esi + 0x16]
imul ecx, edx
mov dword [eax + 0x1c], ecx
call fcn.00402550
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [0x57defc], 0x6d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret