Function at 0x43a188
Capabilities:
Get file size
Get system information on windows
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff68
mov eax, 0x4d1a68
push ebx
push esi
push edi
call fcn.004ae0a4
mov word [ebp - 0x20], 8
mov edx, 0x4c9838
mov ecx, dword [ebp + 8]
mov dword [ecx], edx
inc dword [ebp - 0x14]
mov eax, 0x4d1ad0
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x30], 0xffff
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov edx, dword [ebp + 8]
xor ecx, ecx
mov dword [edx + 0x34], ecx
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [eax + 4], edx
lea ecx, [ebp - 0x98]
push ecx
call sub.kernel32.dll_GetSystemInfo
mov dl, 1
mov eax, dword [0x4941a0]
call fcn.004222f4
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x28], eax
mov dl, 1
mov eax, dword [0x4941a0]
call fcn.004222f4
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x2c], eax
mov eax, dword [ebp + 8]
add eax, 0x10
push eax
call sub.kernel32.dll_InitializeCriticalSection
push 0
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 4]
push ecx
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x38], eax
xor edx, edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], 0xffffffff
jmp 0x43a6a8
lea ecx, [ebp - 0x48]
push 0
push ecx
lea eax, [ebp - 0x44]
push 4
push eax
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 4]
push ecx
call sub.kernel32.dll_ReadFile
test eax, eax
jne 0x43a2b6
call sub.kernel32.dll_GetLastError
mov word [ebp - 0x20], 8
lea eax, [ebp - 0x30]
mov edx, 0x4d19b3
push eax
push 0
push 0
push 0
push 1
push fcn.0042a700
push 0
lea eax, [ebp - 4]
mov word [ebp - 0x20], 0x14
call fcn.004bad00
inc dword [ebp - 0x14]
mov ecx, dword [eax]
mov dl, 1
mov eax, dword [0x4a21c8]
call fcn.004a5d48
push eax
push 0x404274
call fcn.004b7b21
add esp, 0x24
cmp dword [ebp - 0x48], 4
jae 0x43a30c
call sub.kernel32.dll_GetLastError
mov word [ebp - 0x20], 8
lea edx, [ebp - 0x30]
lea eax, [ebp - 8]
push edx
push 0
push 0
push 0
push 1
push fcn.0042a700
push 0
mov edx, str.Error:_Error_in_read_file.
mov word [ebp - 0x20], 0x20
call fcn.004bad00
inc dword [ebp - 0x14]
mov ecx, dword [eax]
mov dl, 1
mov eax, dword [0x4a21c8]
call fcn.004a5d48
push eax
push 0x404274
call fcn.004b7b21
add esp, 0x24
add ebx, dword [ebp - 0x48]
mov dword [ebp - 0x38], ebx
movsx ecx, byte [ebp - 0x44]
cmp ecx, 0x53
je 0x43a36e
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x30]
mov word [ebp - 0x20], 8
push eax
push 0
push 0
push 0
push 1
push fcn.0042a700
push 0
lea eax, [ebp - 0xc]
mov word [ebp - 0x20], 0x2c
mov edx, str.Error:_Not_supported_format_of_hex_file__Motorola_.
call fcn.004bad00
inc dword [ebp - 0x14]
mov ecx, dword [eax]
mov dl, 1
mov eax, dword [0x4a21c8]
call fcn.004a5d48
push eax
push 0x404274
call fcn.004b7b21
add esp, 0x24
mov dx, word [0x4d19a4]
mov word [ebp - 0x57], dx
mov dl, byte [0x4d19a6]
mov byte [ebp - 0x55], dl
lea edx, [ebp - 0x50]
mov word [ebp - 0x20], 8
mov cl, byte [ebp - 0x42]
mov byte [ebp - 0x57], cl
lea ecx, [ebp - 0x57]
mov al, byte [ebp - 0x41]
mov byte [ebp - 0x56], al
push edx
push 0x4d1a1d
push ecx
call fcn.004b0638
add esp, 0xc
mov eax, dword [0x4d19a7]
mov dword [ebp - 0x60], eax
mov eax, dword [0x4d19ab]
mov dword [ebp - 0x5c], eax
mov al, byte [0x4d19af]
mov byte [ebp - 0x58], al
push 8
push 0x30
lea edx, [ebp - 0x60]
push edx
call fcn.004adce0
add esp, 0xc
mov dl, byte [ebp - 0x43]
movsx eax, dl
cmp eax, 0x31
sete cl
and ecx, 1
cmp eax, 0x32
sete bl
and ebx, 1
or ecx, ebx
cmp eax, 0x33
sete al
and eax, 1
or ecx, eax
je 0x43a64b
sub dl, 0x31
je 0x43a40e
dec dl
je 0x43a417
dec dl
je 0x43a420
jmp 0x43a427
mov dword [ebp - 0x68], 2
jmp 0x43a427
mov dword [ebp - 0x68], 3
jmp 0x43a427
mov dword [ebp - 0x68], 4
lea edx, [ebp - 0x48]
push 0
push edx
mov eax, 8
mov ebx, dword [ebp - 0x68]
lea edx, [ebp - 0x60]
add ebx, ebx
sub eax, ebx
push ebx
add eax, edx
push eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
mov edx, dword [ebp - 0x38]
add edx, dword [ebp - 0x48]
mov dword [ebp - 0x38], edx
mov ecx, dword [ebp - 0x50]
sub ecx, dword [ebp - 0x68]
add ecx, ecx
add ecx, 0xfffffffe
push ecx
call fcn.004ad1e0
pop ecx
mov dword [ebp - 0x64], eax
push 0
lea eax, [ebp - 0x48]
push eax
mov edx, dword [ebp - 0x50]
sub edx, dword [ebp - 0x68]
add edx, edx
add edx, 0xfffffffe
push edx
mov ecx, dword [ebp - 0x64]
push ecx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
push edx
call sub.kernel32.dll_ReadFile
mov ecx, dword [ebp - 0x38]
test eax, eax
add ecx, dword [ebp - 0x48]
lea eax, [ebp - 0x54]
mov dword [ebp - 0x38], ecx
push eax
lea edx, [ebp - 0x60]
push 0x4d1a20
push edx
call fcn.004b0638
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp + 8]
add eax, dword [ebp - 0x50]
add esp, 0xc
sub eax, dword [ebp - 0x68]
dec eax
cdq
cmp edx, dword [ecx + 0xc]
jne 0x43a4c8
cmp eax, dword [ecx + 8]
jbe 0x43a4de
jmp 0x43a4ca
jle 0x43a4de
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp + 8]
add eax, dword [ebp - 0x50]
sub eax, dword [ebp - 0x68]
dec eax
cdq
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
xor edi, edi
xor esi, esi
mov eax, dword [ebp - 0x64]
mov edx, eax
mov dword [ebp - 0x74], edx
jmp 0x43a632
mov cx, word [0x4d19b0]
test edi, edi
mov word [ebp - 0x6b], cx
mov cl, byte [0x4d19b2]
mov byte [ebp - 0x69], cl
mov word [ebp - 0x20], 8
mov eax, dword [ebp - 0x74]
mov dl, byte [eax]
mov byte [ebp - 0x6b], dl
mov ecx, dword [ebp - 0x74]
mov al, byte [ecx + 1]
mov byte [ebp - 0x6a], al
je 0x43a540
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x54]
add ecx, esi
mov eax, ecx
mov ebx, dword [edx + 0x30]
xor edx, edx
div ebx
mov eax, ecx
sub eax, edx
xor edx, edx
cmp edx, dword [edi + 4]
jne 0x43a53c
cmp eax, dword [edi]
je 0x43a540
xor edi, edi
test edi, edi
jne 0x43a604
xor ebx, ebx
jmp 0x43a597
mov eax, dword [ebp + 8]
mov edx, ebx
mov eax, dword [eax + 0x28]
call fcn.00495cb8
mov edx, dword [eax + 4]
mov eax, dword [eax]
push edx
push eax
mov eax, dword [ebp - 0x54]
add eax, esi
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x30]
xor edx, edx
div ecx
mov eax, dword [ebp - 0x54]
add eax, esi
sub eax, edx
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x43a581
cmp eax, dword [esp]
pop edx
pop eax
jne 0x43a596
mov eax, dword [ebp + 8]
mov edx, ebx
mov eax, dword [eax + 0x28]
call fcn.00495cb8
mov edi, eax
jmp 0x43a5a2
inc ebx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x28]
cmp ebx, dword [edx + 8]
jl 0x43a54c
test edi, edi
jne 0x43a604
push 0x10
call fcn.004ad03c
mov edx, dword [ebp + 8]
pop ecx
mov ecx, dword [ebp - 0x54]
mov edi, eax
add ecx, esi
mov ebx, dword [edx + 0x30]
xor edx, edx
mov eax, ecx
div ebx
mov eax, ecx
sub eax, edx
xor edx, edx
mov dword [edi], eax
mov dword [edi + 4], edx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x30]
add eax, eax
push eax
call fcn.004ad1e0
pop ecx
mov ebx, eax
mov dword [edi + 8], ebx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x30]
add edx, edx
push edx
push 0xff
push ebx
call fcn.004adce0
add esp, 0xc
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x28]
mov edx, edi
call fcn.00495b5c
lea ecx, [ebp - 0x6e]
lea eax, [ebp - 0x6b]
push ecx
push 0x4d1a23
push eax
call fcn.004b0638
add esp, 0xc
mov eax, dword [edi]
mov edx, dword [ebp - 0x54]
sub edx, eax
add edx, esi
mov ecx, dword [edi + 8]
mov ax, word [ebp - 0x6e]
mov word [ecx + edx*2], ax
inc esi
add dword [ebp - 0x74], 2
mov edx, dword [ebp - 0x50]
sub edx, dword [ebp - 0x68]
dec edx
cmp esi, edx
jl 0x43a4ef
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.004ad018
pop ecx
mov byte [ebp - 0x6f], 0
mov word [ebp - 0x20], 8
jmp 0x43a684
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x34]
jb 0x43a667
mov word [ebp - 0x20], 8
jmp 0x43a68d
lea edx, [ebp - 0x48]
push 0
push edx
lea ecx, [ebp - 0x6f]
push 1
push ecx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
push edx
call sub.kernel32.dll_ReadFile
test eax, eax
inc dword [ebp - 0x38]
movsx ecx, byte [ebp - 0x6f]
cmp ecx, 0x53
jne 0x43a657
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x34]
jae 0x43a6a8
push 1
push 0xffffffffffffffff
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 4]
push ecx
call sub.kernel32.dll__llseek
dec dword [ebp - 0x38]
mov ebx, dword [ebp - 0x38]
cmp ebx, dword [ebp - 0x34]
jb 0x43a24a
mov eax, dword [ebp - 0x30]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret