Function at 0x462040
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x40
mov eax, dword [ecx + 0x248]
push ebx
push ebp
mov dword [esp + 0xc], ecx
mov ecx, dword [eax + 0x418]
mov eax, dword [ecx + 0xec]
push esi
push edi
xor edi, edi
push eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov word [esp + 0x4c], di
mov word [esp + 0x4e], di
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [esp + 0x58]
add esp, 4
mov ebp, eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
cmp dword [esp + 0x38], 0
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 0x248]
jne 0x462107
mov ecx, dword [esi + 0x418]
mov eax, dword [esp + 0x2c]
mov ebx, dword [ecx + 0xec]
add eax, 1
mul ebx
push 0
push 0
push edx
mov edx, dword [esi]
push eax
push edx
mov dword [esp + 0x4c], 1
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [esi]
push 0
lea ecx, [esp + 0x28]
push ecx
push ebx
push ebp
push eax
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4624b1
mov dword [esp + 0x30], 0
mov edi, dword [esp + 0x30]
movzx edx, word [ebp + 0x22]
cmp edi, edx
jb 0x462167
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x462167
mov ecx, dword [esi + 0x418]
mov ebx, dword [ecx + 0xec]
add eax, 1
mul ebx
push 0
push 0
push edx
mov edx, dword [esi]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [esi]
push 0
lea ecx, [esp + 0x2c]
push ecx
push ebx
push ebp
push eax
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x462167
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x30], 0
mov edi, dword [esp + 0x30]
mov dword [esp + 0x2c], edx
movzx eax, word [ebp + 0x22]
cmp edi, eax
jae 0x4624b1
push ebp
lea ebx, [esp + 0x40]
mov ecx, edi
mov edx, esi
call fcn.004619a0
mov ecx, edi
add edi, 1
test eax, eax
je 0x4624b1
mov eax, dword [esp + 0x1c]
add eax, 1
cmp eax, 0x3e8
mov dword [esp + 0x1c], eax
jle 0x4621ae
mov edx, dword [esp + 0x54]
cmp dword [esp + 0x2c], edx
je 0x4624b1
test ecx, ecx
jne 0x4621e4
mov eax, dword [esp + 0x40]
mov eax, dword [eax]
mov ecx, eax
mov edx, eax
shr edx, 0x10
and ecx, 0xff0000
or ecx, edx
mov edx, eax
shl edx, 0x10
and eax, 0xff00
or edx, eax
shr ecx, 8
shl edx, 8
or ecx, edx
mov dword [esp + 0x20], ecx
jmp 0x46209c
mov si, word [esp + 0x4a]
mov ecx, dword [esp + 0x3c]
movzx eax, si
sub ecx, eax
cmp ecx, 4
jb 0x46209c
mov ax, word [esp + 0x48]
cmp ax, 4
mov ebx, dword [esp + 0x40]
jb 0x462235
movzx edx, si
mov ecx, dword [edx + ebx]
mov eax, ecx
mov edx, ecx
shr edx, 0x10
and eax, 0xff0000
or eax, edx
mov edx, ecx
shl edx, 0x10
and ecx, 0xff00
or edx, ecx
shr eax, 8
shl edx, 8
or eax, edx
jmp 0x46227c
test ax, ax
jne 0x462240
mov eax, dword [esp + 0x20]
jmp 0x46227c
mov edx, dword [esp + 0x48]
mov ecx, 4
sub ecx, edx
add ecx, ecx
add ecx, ecx
add ecx, ecx
movzx eax, si
mov edx, dword [eax + ebx]
shl edx, cl
mov eax, edx
mov ecx, edx
shr ecx, 0x10
and eax, 0xff0000
or eax, ecx
mov ecx, edx
shl ecx, 0x10
and edx, 0xff00
or ecx, edx
shr eax, 8
shl ecx, 8
or eax, ecx
test byte [ebp + 0x24], 4
mov ecx, dword [esp + 0x58]
je 0x4622bb
cmp eax, ecx
jb 0x46209c
movzx eax, word [esp + 0x48]
movzx edx, si
add eax, ebx
mov eax, dword [edx + eax]
mov edx, dword [esp + 0x60]
push 1
push edx
mov edx, dword [esp + 0x64]
push edx
push ecx
mov ecx, dword [esp + 0x24]
push eax
call fcn.00462040
mov dword [esp + 0x18], eax
jmp 0x4624b1
cmp ecx, 0x100
jb 0x4622cd
mov edx, ecx
and edx, 0xffffff00
or eax, edx
cmp eax, ecx
jne 0x46209c
movzx eax, word [esp + 0x48]
movzx ecx, si
add eax, ebx
cmp dword [esp + 0x38], 0
mov edx, dword [ecx + eax + 4]
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 0x248]
mov dword [esp + 0x54], edx
mov ebx, 1
jne 0x46231c
mov ecx, dword [esp + 0x2c]
push ecx
push ebp
mov eax, esi
mov dword [esp + 0x40], ebx
call fcn.00461ac0
test eax, eax
je 0x4624b1
mov dword [esp + 0x30], ebx
mov edi, ebx
movzx edx, word [ebp + 0x22]
cmp edi, edx
jb 0x462345
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x462345
push eax
push ebp
mov eax, esi
call fcn.00461ac0
test eax, eax
je 0x462345
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebx
mov edi, ebx
movzx ecx, word [ebp + 0x22]
cmp edi, ecx
jae 0x4624b1
push ebp
lea ebx, [esp + 0x40]
mov ecx, edi
mov edx, esi
call fcn.004619a0
add edi, 1
test eax, eax
mov dword [esp + 0x30], edi
je 0x4624b1
movzx edx, word [esp + 0x48]
movzx eax, word [esp + 0x4a]
mov esi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x54]
mov edi, dword [esp + 0x14]
sub esi, edx
sub esi, eax
call fcn.004613a0
test eax, eax
mov dword [esp + 0x58], eax
je 0x4624b1
movzx ecx, word [esp + 0x48]
movzx edx, word [esp + 0x4a]
add ecx, dword [esp + 0x40]
push esi
add edx, ecx
push edx
push eax
call sub.msvcrt.dll_memcpy
mov eax, ebx
add esp, 0xc
cmp esi, eax
jae 0x462495
mov edi, esi
cmp dword [esp + 0x38], 0
mov eax, dword [esp + 0x14]
mov ebx, dword [eax + 0x248]
mov dword [esp + 0x28], ebx
jne 0x4623f5
mov ecx, dword [esp + 0x2c]
push ecx
mov esi, 1
push ebp
mov eax, ebx
mov dword [esp + 0x40], esi
call fcn.00461ac0
test eax, eax
je 0x462495
jmp 0x4623f9
mov esi, dword [esp + 0x30]
movzx edx, word [ebp + 0x22]
cmp esi, edx
jb 0x462428
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x462428
push eax
push ebp
mov eax, ebx
call fcn.00461ac0
test eax, eax
je 0x462428
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x30], 1
mov esi, dword [esp + 0x30]
mov dword [esp + 0x2c], eax
movzx ecx, word [ebp + 0x22]
cmp esi, ecx
jae 0x462495
mov edx, dword [esp + 0x28]
push ebp
lea ebx, [esp + 0x40]
mov ecx, esi
call fcn.004619a0
add esi, 1
test eax, eax
mov dword [esp + 0x30], esi
je 0x462495
mov cx, word [esp + 0x48]
mov eax, dword [esp + 0x3c]
movzx edx, cx
sub eax, edx
mov dx, word [esp + 0x4a]
movzx esi, dx
sub eax, esi
lea ebx, [edi + eax]
cmp ebx, dword [esp + 0x54]
ja 0x462495
push eax
movzx eax, cx
add eax, dword [esp + 0x44]
movzx ecx, dx
mov edx, dword [esp + 0x5c]
add ecx, eax
push ecx
add edi, edx
push edi
call sub.msvcrt.dll_memcpy
mov edi, ebx
add esp, 0xc
cmp edi, dword [esp + 0x54]
jb 0x4623c0
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x60]
mov dword [eax], ecx
mov eax, dword [esp + 0x54]
mov dword [edx], eax
mov dword [esp + 0x18], 1
test ebp, ebp
je 0x4624be
push ebp
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 0x14