Function at 0x404600
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x489ce0
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
mov eax, dword [0x4b30f0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [edi + 0xc], ebx
jne 0x4049b7
cmp byte [edi + 0x1b], 1
mov eax, dword [edi + 8]
jne 0x40467f
cmp eax, 0xffff
jae 0x404667
mov ecx, dword [0x4b6a30]
push 0x2000
push ebx
push ebx
movzx eax, ax
push ebx
push eax
push ecx
call dword [0x496458]
mov dword [edi + 0xc], eax
jmp 0x404951
push 0x2010
push ebx
push ebx
push ebx
push eax
push ebx
call dword [0x496458]
mov dword [edi + 0xc], eax
jmp 0x404951
cmp eax, 0xffff
jae 0x404807
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x40], ebx
cmp byte [edi + 0x1b], 3
jne 0x40473c
mov eax, dword [edi + 8]
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
movzx edx, ax
push ecx
mov eax, esp
mov dword [ecx], edx
lea esi, [esp + 0x1c]
mov dword [esp + 0x18], esp
mov dword [eax], 0x49a3a8
call fcn.00404460
test al, al
je 0x40473c
lea eax, [esp + 0xc]
push eax
call fcn.004044a0
mov byte [esp + 0x40], 1
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x10]
push edx
call fcn.0041b9c0
mov byte [esp + 0x40], 2
mov esi, dword [eax]
mov eax, dword [esp + 0x18]
mov ecx, dword [0x4b6a30]
push eax
push ecx
call dword [0x496374]
mov edx, dword [esp + 0x14]
push edx
mov ebx, eax
call dword [0x496370]
mov ecx, dword [esi]
mov edx, dword [ecx + 0xc]
push ebx
push eax
push esi
call edx
mov dword [edi + 0xc], eax
mov byte [esp + 0x40], 1
lea ecx, [esp + 0x1c]
call fcn.00404520
mov byte [esp + 0x40], 0
lea eax, [esp + 0xc]
push eax
call fcn.0041e8b0
jmp 0x4047dd
cmp byte [edi + 0x1b], 2
jne 0x4047df
mov eax, dword [edi + 8]
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
movzx edx, ax
push ecx
mov eax, esp
mov dword [ecx], edx
lea esi, [esp + 0x1c]
mov dword [esp + 0x18], esp
mov dword [eax], 0x49a3b0
call fcn.00404460
test al, al
je 0x4047df
lea eax, [esp + 0xc]
push eax
call fcn.00404550
mov byte [esp + 0x40], 3
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x10]
push edx
call fcn.0041b9c0
mov byte [esp + 0x40], 4
mov esi, dword [eax]
mov eax, dword [esp + 0x18]
mov ecx, dword [0x4b6a30]
push eax
push ecx
call dword [0x496374]
mov edx, dword [esp + 0x14]
push edx
mov ebx, eax
call dword [0x496370]
mov ecx, dword [esi]
mov edx, dword [ecx + 0xc]
push ebx
push eax
push esi
call edx
mov dword [edi + 0xc], eax
mov byte [esp + 0x40], 3
lea ecx, [esp + 0x1c]
call fcn.00404520
mov byte [esp + 0x40], 0
lea eax, [esp + 0xc]
push eax
call fcn.0041e8b0
xor ebx, ebx
mov dword [esp + 0x40], 0xffffffff
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x404951
push eax
call dword [0x496350]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
jmp 0x404951
push 0x49a3b8
push eax
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x18], ebx
call fcn.00470a01
add esp, 0xc
test eax, eax
jne 0x404951
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x404951
push 2
push ebx
push eax
call fcn.00470694
mov edx, dword [esp + 0x18]
add esp, 0xc
push edx
call fcn.004708b6
add esp, 4
push 0
mov ebx, eax
mov eax, dword [esp + 0x10]
push 0
push eax
call fcn.00470694
add esp, 0xc
push ebx
call fcn.0046edb7
mov esi, eax
add esp, 4
test esi, esi
je 0x404942
mov ecx, dword [esp + 0xc]
push ecx
push ebx
push 1
push esi
call fcn.004705ed
mov al, byte [edi + 0x1b]
add esp, 0x10
cmp al, 3
jne 0x4048e0
lea edx, [esp + 0x10]
push edx
call fcn.004044a0
mov dword [esp + 0x40], 5
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
push ecx
call fcn.0041b9c0
mov byte [esp + 0x40], 6
mov eax, dword [eax]
mov edx, dword [eax]
push ebx
push esi
push eax
mov eax, dword [edx + 0xc]
call eax
mov dword [edi + 0xc], eax
mov byte [esp + 0x40], 5
lea ecx, [esp + 0x1c]
call fcn.00404520
mov dword [esp + 0x40], 0xffffffff
lea ecx, [esp + 0x10]
push ecx
call fcn.0041e8b0
jmp 0x404939
cmp al, 2
jne 0x404939
lea edx, [esp + 0x10]
push edx
call fcn.00404550
mov dword [esp + 0x40], 7
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
push ecx
call fcn.0041b9c0
mov byte [esp + 0x40], 8
mov eax, dword [eax]
mov edx, dword [eax]
push ebx
push esi
push eax
mov eax, dword [edx + 0xc]
call eax
mov dword [edi + 0xc], eax
mov byte [esp + 0x40], 7
lea ecx, [esp + 0x1c]
call fcn.00404520
mov dword [esp + 0x40], 0xffffffff
lea ecx, [esp + 0x10]
push ecx
call fcn.0041e8b0
push esi
call fcn.00470318
add esp, 4
mov edx, dword [esp + 0xc]
push edx
call fcn.0047029c
add esp, 4
xor ebx, ebx
mov eax, dword [edi + 0xc]
cmp eax, ebx
jne 0x404979
xor eax, eax
mov word [edi + 0x18], ax
mov dword [edi + 0x10], ebx
mov dword [edi + 0x14], ebx
mov byte [edi + 0x1a], al
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x1c]
push ecx
push 0x18
push eax
call dword [0x4960f0]
mov esi, dword [esp + 0x20]
movzx ecx, word [edi + 0x18]
mov eax, esi
cdq
idiv ecx
mov edx, dword [esp + 0x24]
cmp word [esp + 0x2e], 0x20
mov dword [edi + 0x14], edx
sete dl
mov byte [edi + 0x1a], dl
mov dword [edi + 0x10], eax
imul eax, ecx
xor ecx, ecx
cmp eax, esi
sete cl
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret