Function at 0x49ef34
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x19]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x56a968
lea esi, [ebp - 0x24]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], str.InitSoftfusesBin
mov dword [esp + 8], esi
mov dword [esp + 4], 0x400
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call fcn.0046b578
mov eax, dword [ebp - 0x24]
lea esi, [eax - 0xc]
cmp esi, 0x55a154
jne 0x49f3b8
mov eax, dword [ebx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call fcn.0046dd98
mov edi, eax
mov dword [esp], eax
call fcn.00538984
mov dword [ebx + 0x24], eax
mov dword [esp + 4], 0x56a97f
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov esi, eax
test eax, eax
je 0x49f256
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
je 0x49f224
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [esp], ebx
call fcn.0049ea8c
mov dword [esp], ebx
call fcn.0049eb6c
test al, al
je 0x49f118
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x28]
lea ecx, [edx + 1]
cmp ecx, eax
jae 0x49f05b
sub eax, 2
sub eax, edx
xor edx, edx
add eax, 5
adc edx, 0
mov ecx, eax
xor ecx, 0x20
or ecx, edx
je 0x49f19c
mov ecx, eax
xor ecx, 0x24
or ecx, edx
je 0x49f10c
mov eax, 0x10
mov dword [ebx + 0xc], eax
mov dword [esp], eax
call fcn.00538984
mov dword [ebx + 0x10], eax
test eax, eax
je 0x49f471
mov eax, dword [ebx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call fcn.0046dd98
sub eax, dword [ebx + 0xc]
sub eax, 0x300
mov dword [ebx], eax
sub edi, dword [ebx + 0xc]
mov dword [ebx + 4], edi
mov dword [ebx + 0x18], edi
mov dword [esp], edi
call fcn.00538984
mov dword [ebx + 0x14], eax
test eax, eax
je 0x49f43f
mov dword [esp + 0xc], esi
mov edx, dword [ebx + 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x18]
jne 0x49f4a3
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0xc]
jne 0x49f40d
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov al, 1
add esp, 0x5c
pop ebx
pop esi
pop edi
leave
ret
mov eax, 0x24
jmp 0x49f060
lea eax, [ebp - 0x1a]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Unable_to_find_SUP_header
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00509af0
lea edx, [ebp - 0x28]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x800
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call fcn.0046b578
mov eax, dword [ebp - 0x28]
lea edx, [eax - 0xc]
mov dword [ebp - 0x3c], edx
mov edx, 0x55a154
cmp edx, dword [ebp - 0x3c]
je 0x49f027
cmp dword [0x554500], 0
jne 0x49f280
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx + 8]
lea edx, [eax - 1]
mov dword [ecx + 8], edx
test eax, eax
jg 0x49f027
lea eax, [ebp - 0x1f]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call fcn.005084ec
jmp 0x49f027
mov eax, 0x20
jmp 0x49f060
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov dword [esp], 4
call fcn.00538b64
mov dword [eax], 8
mov dword [esp + 8], 0
mov dword [esp + 4], 0x57285c
mov dword [esp], eax
call fcn.00539374
mov dword [esp], 4
call fcn.00538b64
mov dword [eax], 8
mov dword [esp + 8], 0
mov dword [esp + 4], 0x57285c
mov dword [esp], eax
call fcn.00539374
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x49f17c
mov dword [ebp - 0x40], eax
call fcn.00538ed4
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sub.libgcc_s_dw2_1.dll__Unwind_Resume
mov dword [esp], esi
mov dword [ebp - 0x40], eax
call fcn.0050a12c
mov eax, dword [ebp - 0x40]
jmp 0x49f37a
cmp dword [0x554500], 0
jne 0x49f3f8
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x49ef8b
lea eax, [ebp - 0x1e]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x49ef8b
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x49f3ca
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov dword [esp], 4
call fcn.00538b64
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x57285c
mov dword [esp], eax
call fcn.00539374
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov dword [esp], 4
call fcn.00538b64
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x57285c
mov dword [esp], eax
call fcn.00539374
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov dword [esp], 4
call fcn.00538b64
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x57285c
mov dword [esp], eax
call fcn.00539374
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov dword [esp], 4
call fcn.00538b64
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x57285c
mov dword [esp], eax
call fcn.00539374
jmp 0x49f385