Function at 0x10003160
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x20]
push edi
mov edi, dword [esi + 8]
imul edi, dword [esp + 0x2c]
add edi, dword [esi + 0xc]
xor ebx, ebx
cmp eax, 1
mov dword [esp + 0x10], ebx
je 0x1000332e
cmp eax, 2
je 0x1000332e
cmp eax, 3
jne 0x10003422
mov eax, dword [esi + 0x1c]
sub eax, 1
je 0x1000331f
sub eax, 1
je 0x1000326c
sub eax, 1
jne 0x100033fd
mov edx, dword [esi + 0x24]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
push edx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_ClearCommError]
test eax, eax
je 0x1000321b
cmp dword [esp + 0x14], 0
jne 0x100032d0
mov eax, dword [esp + 0x1c]
cmp eax, ebp
jbe 0x1000322a
cmp eax, dword [esp + 0x2c]
mov ebp, eax
ja 0x100033c4
mov eax, dword [esi + 4]
add ebx, eax
cmp ebx, edi
jae 0x10003431
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esi + 0x24]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
test eax, eax
jne 0x100031d0
pop edi
pop esi
pop ebp
mov eax, 0x2000010b
pop ebx
add esp, 0x14
ret 0xc
mov edx, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
mov edi, eax
mov eax, dword [esi + 0x24]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100033ad
mov eax, dword [esp + 0x10]
cmp edi, eax
mov ecx, dword [esp + 0x30]
mov dword [ecx], eax
je 0x10003422
pop edi
pop esi
pop ebp
mov eax, 0x20000106
pop ebx
add esp, 0x14
ret 0xc
mov ecx, dword [esi + 0x24]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
test eax, eax
je 0x100032c1
cmp dword [esp + 0x14], 0
jne 0x100032d0
mov ebp, dword [esp + 0x2c]
cmp dword [esp + 0x1c], ebp
je 0x100032df
mov eax, dword [esi + 4]
add ebx, eax
cmp ebx, edi
jae 0x10003431
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esi + 0x24]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
test eax, eax
jne 0x10003284
pop edi
pop esi
pop ebp
mov eax, 0x2000010b
pop ebx
add esp, 0x14
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 0x2000010c
pop ebx
add esp, 0x14
ret 0xc
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 0x24]
push 0
lea edx, [esp + 0x14]
push edx
push ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100033ad
mov eax, dword [esp + 0x10]
cmp ebp, eax
mov edx, dword [esp + 0x30]
mov dword [edx], eax
je 0x10003422
pop edi
pop esi
pop ebp
mov eax, 0x20000106
pop ebx
add esp, 0x14
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 0x2000010d
pop ebx
add esp, 0x14
ret 0xc
mov eax, dword [esi + 0x18]
push 0x400
push ebx
push eax
xor ebp, ebp
call fcn.100044b0
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x24]
add esp, 0xc
push ebx
lea ecx, [esp + 0x14]
push ecx
push 0x400
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100033ad
nop
mov ebx, dword [esp + 0x10]
test ebx, ebx
ja 0x100033bc
mov eax, dword [esi + 4]
add ebp, eax
cmp ebp, edi
jae 0x10003431
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esi + 0x18]
push 0x400
push 0
push ecx
call fcn.100044b0
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x24]
add esp, 0xc
push 0
lea edx, [esp + 0x14]
push edx
push 0x400
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10003360
pop edi
pop esi
pop ebp
mov eax, 0x20000106
pop ebx
add esp, 0x14
ret 0xc
mov edi, dword [esp + 0x2c]
cmp ebx, edi
jbe 0x100033d3
pop edi
pop esi
pop ebp
mov eax, 0x20000108
pop ebx
add esp, 0x14
ret 0xc
mov edx, dword [esi + 0x18]
mov eax, dword [esp + 0x28]
push ebx
push edx
push eax
call fcn.10004540
mov ecx, dword [esp + 0x3c]
mov dword [ecx], ebx
mov esi, dword [esi + 0x1c]
add esp, 0xc
sub esi, 1
je 0x10003422
sub esi, 1
je 0x1000340c
sub esi, 1
je 0x10003422
pop edi
pop esi
pop ebp
mov eax, 0x2000010a
pop ebx
add esp, 0x14
ret 0xc
lea edx, [ebx + ebx]
cmp edi, edx
je 0x10003422
pop edi
pop esi
pop ebp
mov eax, 0x20000109
pop ebx
add esp, 0x14
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 0x20000107
pop ebx
add esp, 0x14
ret 0xc