Function at 0x1003d530
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push ebx
sub esp, 0xc
mov ebx, eax
mov eax, dword [ebp + 0x14]
mov edi, ecx
mov esi, edx
cmp dword [ebp + 0x24], 0
mov dword [eax], 0
je 0x1003d753
mov eax, dword [ebp + 0x24]
cmp dword [eax + 0x28], 0xfffffffc
je 0x1003d738
cmp dword [0x1024c380], 0
je 0x1003d627
mov eax, dword [ebp + 0x20]
lea edx, [eax - 1]
cmp edx, 1
ja 0x1003d581
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
cmp dword [ebp + 0x18], 0
je 0x1003d604
cmp dword [ebp + 0x20], 0xfffffffa
je 0x1003d71f
cmp dword [ebp + 0x20], 0
je 0x1003d6ea
cmp dword [ebp + 0x1c], 0
je 0x1003d60e
mov dword [ebp - 0x18], 0
push dword [ebp - 0x14]
call fcn.10066b20
push dword [ebp - 0x14]
call fcn.10066b40
add esp, 8
cmp dword [ebp - 0x18], 0
je 0x1003d60e
push dword [ebp - 0x14]
push edi
push esi
call fcn.10066b20
mov edi, eax
add esp, 0xc
mov eax, dword [ebp + 0x14]
mov dword [eax], edi
cmp edi, 0xffffffff
je 0x1003d577
push 0
push dword [ebp - 0x14]
push 2
push 0x10214cb4
call fcn.10066b20
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov byte [edi + esi], 0xa
inc dword [eax]
mov eax, 1
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
cmp dword [ebp + 0x20], 0
je 0x1003d6ea
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0x14]
cmp dword [ebp + 0x24], 0
mov dword [eax], 0
jne 0x1003d638
jmp 0x1003d645
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
mov eax, dword [ebp + 0x24]
mov eax, dword [eax + 0x158]
test eax, eax
jne 0x1003d64a
mov eax, 0x20000
cmp edi, eax
jbe 0x1003d6c2
cmp dword [ebp + 0x20], 0
je 0x1003d6c2
cmp dword [ebp + 0x24], 0
je 0x1003d667
mov eax, dword [ebp + 0x24]
mov eax, dword [eax + 0x158]
test eax, eax
jne 0x1003d66c
mov eax, 0x20000
mov dword [ebp - 0x10], ebx
mov ebx, esi
mov esi, eax
push 0
lea edx, [ebp - 0x18]
push edx
push esi
push ebx
push dword [ebp - 0x10]
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, eax
test edx, edx
je 0x1003d6db
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x18]
add ebx, eax
sub edi, eax
add dword [ecx], eax
cmp dword [ebp + 0x24], 0
je 0x1003d6ac
mov ecx, dword [ebp + 0x24]
mov ecx, dword [ecx + 0x158]
test ecx, ecx
jne 0x1003d6b1
mov ecx, 0x20000
cmp edi, ecx
ja 0x1003d6b7
mov esi, edi
test edi, edi
je 0x1003d6db
cmp eax, dword [ebp - 0x14]
je 0x1003d673
jmp 0x1003d6db
push 0
lea eax, [ebp - 0x18]
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, eax
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x18]
mov dword [ecx], eax
xor eax, eax
test edx, edx
setne al
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
call fcn.10066b40
mov dword [ebp - 0x14], eax
cmp dword [0x1024c380], 0
je 0x1003d5c1
cmp dword [ebp + 0x18], 0
je 0x1003d5c1
cmp dword [ebp + 0x1c], 0
je 0x1003d5c1
mov dword [ebp - 0x18], 1
jmp 0x1003d5a8
mov dword [ebp - 0x14], ebx
cmp dword [ebp + 0x1c], 0
je 0x1003d5c1
mov dword [ebp - 0x18], 1
jmp 0x1003d5a8
call fcn.10023bf0
cmp eax, 1
jle 0x1003d55f
mov eax, 1
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
cmp dword [0x1024c380], 0
jne 0x1003d56c
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
jmp 0x1003d645