Function at 0x4053a7
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push edi
push 2
mov edi, ecx
push 0
push ebx
mov dword [ebp - 0x10], edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
test eax, eax
je 0x4053d3
mov eax, 0x80004005
jmp 0x405684
push esi
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov esi, eax
pop ecx
test esi, esi
jle 0x4054f0
lea eax, [esi + 2]
push eax
lea eax, [ebp + 8]
push eax
call fcn.0040271a
pop ecx
pop ecx
push eax
lea ecx, [edi + 0x24]
call fcn.00403180
mov eax, dword [ebp + 8]
and dword [ebp + 8], 0
test eax, eax
je 0x405411
push eax
call dword [sym.imp.mozglue.dll_free]
pop ecx
xor eax, eax
cmp dword [edi + 0x24], eax
je 0x4056c4
push eax
push eax
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x405440
push ebx
push esi
push 1
push dword [edi + 0x24]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, esi
je 0x40544a
mov eax, 0x80470003
jmp 0x405683
mov eax, dword [edi + 0x24]
mov byte [eax + esi + 1], 0
mov eax, dword [edi + 0x24]
mov byte [esi + eax], 0
mov ecx, dword [edi + 0x24]
mov dword [ebp - 4], ecx
cmp esi, 3
jl 0x40547b
cmp byte [ecx], 0xef
jne 0x40547b
cmp byte [ecx + 1], 0xbb
jne 0x40547b
cmp byte [ecx + 2], 0xbf
jne 0x40547b
lea eax, [ecx + 3]
mov dword [ebp - 4], eax
cmp esi, 2
jl 0x405584
cmp byte [ecx], 0xff
jne 0x405584
cmp byte [ecx + 1], 0xfe
jne 0x405584
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
lea eax, [ecx + 2]
push eax
push 0
push 0xfde9
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
test ebx, ebx
je 0x4054f0
push ebx
call dword [sym.imp.mozglue.dll_moz_xmalloc]
pop ecx
push 0
push 0
push ebx
mov esi, eax
push esi
push 0xffffffffffffffff
push dword [ebp - 4]
mov dword [ebp + 8], esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4054fa
test esi, esi
je 0x4054f0
push esi
call dword [sym.imp.mozglue.dll_free]
pop ecx
mov eax, 0x80004005
jmp 0x405683
lea eax, [ebp + 8]
push eax
lea ecx, [edi + 0x24]
call fcn.00403180
cmp dword [ebp + 8], 0
mov eax, dword [edi + 0x24]
mov dword [ebp - 4], eax
je 0x405584
push dword [ebp + 8]
call dword [sym.imp.mozglue.dll_free]
pop ecx
jmp 0x405584
mov cl, byte [eax]
cmp cl, 0x23
je 0x405666
cmp cl, 0x3b
je 0x405666
push eax
push 0x413de0
call fcn.0040e8b9
mov esi, eax
mov dword [ebp + 8], esi
pop ecx
pop ecx
mov al, byte [esi]
test al, al
je 0x405666
cmp al, 0x5b
jne 0x40558b
lea eax, [ebp + 8]
inc esi
push eax
push 0x413de4
mov dword [ebp + 8], esi
mov edi, esi
call fcn.0040e8e7
pop ecx
pop ecx
test eax, eax
je 0x405584
lea eax, [ebp + 8]
push eax
push 0x413de0
call fcn.0040e8e7
pop ecx
pop ecx
test eax, eax
je 0x405666
xor edi, edi
jmp 0x405666
test edi, edi
je 0x405666
lea eax, [ebp + 8]
mov dword [ebp - 0x14], esi
push eax
push 0x413ddc
call fcn.0040e8e7
pop ecx
pop ecx
test eax, eax
je 0x405666
cmp dword [ebp + 8], 0
je 0x405666
mov ebx, dword [ebp - 0x10]
lea eax, [ebp - 8]
push eax
push edi
mov ecx, ebx
call fcn.00404bf9
test al, al
jne 0x405601
push 0xc
call dword [sym.imp.mozglue.dll_moz_xmalloc]
pop ecx
test eax, eax
je 0x4055e6
mov ecx, dword [ebp + 8]
mov dword [eax], esi
mov dword [eax + 4], ecx
and dword [eax + 8], 0
jmp 0x4055e8
xor eax, eax
mov dword [ebp - 8], eax
test eax, eax
je 0x4056c4
lea eax, [ebp - 8]
mov ecx, ebx
push eax
push edi
call fcn.004065bb
jmp 0x405666
mov ecx, dword [ebp - 8]
jmp 0x405643
mov edx, dword [ecx]
mov eax, esi
mov bl, byte [eax]
cmp bl, byte [edx]
jne 0x40562a
test bl, bl
je 0x405626
mov bl, byte [eax + 1]
cmp bl, byte [edx + 1]
jne 0x40562a
add eax, 2
add edx, 2
test bl, bl
jne 0x40560a
xor eax, eax
jmp 0x40562f
sbb eax, eax
or eax, 1
test eax, eax
je 0x4056cb
mov eax, dword [ecx + 8]
test eax, eax
je 0x40568c
mov ecx, eax
mov dword [ebp - 8], ecx
test ecx, ecx
jne 0x405606
push 0xff
push str.c:_builds_moz2_slave_m_in_w32_d_0000000000000000000_build_src_xpcom_glue_nsINIParser.cpp
push 0x41443c
push str.v_should_never_be_null_coming_out_of_this_loop
push 1
call dword [sym.imp.xul.dll_NS_DebugBreak]
add esp, 0x14
lea eax, [ebp - 4]
push eax
push 0x413dd8
call fcn.0040e8e7
mov dword [ebp + 8], eax
pop ecx
pop ecx
test eax, eax
jne 0x40551e
xor eax, eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
lea esi, [ecx + 8]
call fcn.00402748
add esp, 0xc
mov ecx, esi
push eax
call fcn.004031a5
mov eax, dword [ebp - 0xc]
and dword [ebp - 0xc], 0
test eax, eax
je 0x4056bf
push eax
lea ecx, [ebp - 0xc]
call fcn.004033ee
cmp dword [esi], 0
jne 0x405666
mov eax, 0x8007000e
jmp 0x405683
mov eax, dword [ebp + 8]
mov dword [ecx + 4], eax
jmp 0x405666