Function at 0x403630
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x415004]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
push edi
mov edi, ecx
mov byte [esp + 0x12], dl
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x18], edx
mov eax, dword [edi + 0x14]
mov dword [esp + 0x20], ecx
mov eax, dword [eax + 4]
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
push eax
call fcn.004034e0
mov ebx, dword [esp + 0x18]
add esp, 4
test ebx, ebx
jne 0x4036fc
lea eax, [esp + 0x14]
mov ecx, str..txt
push eax
call fcn.00405d40
mov esi, dword [esp + 0x18]
add esp, 4
cmp byte [esp + 0x12], bl
mov ecx, 0x410991
mov eax, ecx
mov edx, str.Invalid_path
cmove eax, edx
test esi, esi
push eax
mov eax, ecx
cmovne eax, esi
push eax
mov eax, str._r_nContent_Type:
cmove eax, ecx
push eax
push 0xc
push str.403_Forbidden
lea eax, [esp + 0x28]
push str.HTTP_1.1__s_r_nContent_length:__zd_r_nConnection:_close_s_s_r_n_r_n_s
push eax
call fcn.00401e30
add esp, 0x1c
test eax, eax
js 0x403a59
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, dword [esp + 0x18]
add esp, 4
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4036f0
jmp 0x403a97
push 0
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll__open
mov esi, eax
add esp, 8
mov dword [esp + 0x24], esi
mov ecx, ebx
test esi, esi
jns 0x403878
mov byte [esp + 0x13], 0
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403720
sub ecx, edx
cmp ecx, 3
jbe 0x403818
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403737
sub ecx, edx
lea eax, [ebx - 3]
add eax, ecx
push 0x410b7c
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
jne 0x403818
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403761
sub ecx, edx
push ebx
lea eax, [ecx - 2]
push eax
lea eax, [esp + 0x1c]
push str._.sqrc
push eax
call fcn.00401e30
add esp, 0x10
test eax, eax
jns 0x4037a9
mov eax, dword [esp + 0x1c]
push str.asprintf_failed
push eax
mov eax, dword [eax + 0x38]
call eax
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0040d125
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x14]
push 0
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll__open
push esi
mov dword [esp + 0x20], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [esp + 0x20]
add esp, 0xc
test eax, eax
js 0x403818
push eax
mov byte [esp + 0x17], 1
call sub.api_ms_win_crt_stdio_l1_1_0.dll__close
mov esi, dword [esp + 0x24]
add esp, 4
push 0x2f
push esi
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x4037f3
sub ecx, esi
jmp 0x403801
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4037f8
sub ecx, edx
mov eax, dword [esp + 0x1c]
push esi
push ecx
push esi
push ecx
push ebx
push str.Missing_code_generated_WebKit_file:_n___s_nA_matching__.qrc__exists__so_try_generating_the__.js_:_n__cd__.s_.._n__mkdir__p_tmp_n__._CodeGeneratorInspector.py_Inspector.json___output_h_dir_tmp___output_cpp_dir_tmp_n__mv_tmp_.js__.s_n
push eax
mov eax, dword [eax + 0x38]
call eax
add esp, 0x1c
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
add esp, 4
cmp byte [esp + 0x13], al
mov ecx, str.Missing_code_generated_WebKit_file
cmove ecx, eax
mov eax, 0x410991
test ecx, ecx
cmovne eax, ecx
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0x1c]
push str._html__title_Error_404__Not_Found___title__n_p__b_404.__b___ins_Thats_an_error.__ins__n_p_The_requested_URL__code__s__code__was_not_found._n_s__html_
push eax
call fcn.00401e30
add esp, 0x10
test eax, eax
js 0x403a59
mov esi, dword [esp + 0x14]
mov ecx, edi
mov dl, byte [esp + 0x12]
push esi
push str..html
push str.404_Not_Found
call fcn.00402fb0
jmp 0x403aa1
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
call fcn.00405d40
add esp, 4
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call ebx
add esp, 4
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__fstat64i32]
add esp, 8
test eax, eax
jne 0x4039ee
test dword [esp + 0x2e], 0x8000
je 0x4039ee
cmp dword [esp + 0x18], 0
mov ecx, 0x410991
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x20], eax
mov eax, ecx
cmovne eax, dword [esp + 0x18]
push eax
mov eax, str._r_nContent_Type:
mov dword [esp + 0x18], edx
cmove eax, ecx
push eax
push edx
lea eax, [esp + 0x2c]
push str.HTTP_1.1_200_OK_r_nContent_length:__zd_r_nConnection:_close_s_s_r_n_r_n
push eax
call fcn.00401e30
add esp, 0x14
test eax, eax
js 0x403785
push dword [esp + 0x18]
call ebx
mov edx, dword [esp + 0x24]
add esp, 4
mov ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x1c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403916
sub ecx, dword [esp + 0x1c]
mov eax, dword [edi + 0x1c]
push ecx
push edx
push edi
call eax
add esp, 0xc
mov byte [esp + 0x13], al
push dword [esp + 0x20]
call ebx
mov bl, byte [esp + 0x17]
add esp, 4
test bl, bl
jne 0x4039e3
cmp byte [esp + 0x12], bl
jne 0x4039e3
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4039e3
mov edx, 0x1000
mov eax, ecx
cmp ecx, edx
push 1
cmova eax, edx
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
push dword [esp + 0x28]
mov dword [esp + 0x28], eax
xor ebx, ebx
push eax
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
mov esi, eax
add esp, 0x14
test esi, esi
jle 0x4039be
nop
mov ecx, dword [edi + 0x1c]
push esi
push dword [esp + 0x20]
push edi
call ecx
add esp, 0xc
test al, al
jne 0x4039be
push dword [esp + 0x20]
add ebx, esi
push dword [esp + 0x20]
push dword [esp + 0x2c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
mov esi, eax
add esp, 0xc
test esi, esi
jg 0x403990
push dword [esp + 0x24]
call sub.api_ms_win_crt_stdio_l1_1_0.dll__close
add esp, 4
cmp ebx, dword [esp + 0x14]
setne al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0040d125
mov esp, ebp
pop ebp
ret
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll__close
jmp 0x403aad
push dword [esp + 0x18]
call ebx
add esp, 4
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll__close
add esp, 4
lea eax, [esp + 0x14]
mov ecx, str..txt
push eax
call fcn.00405d40
mov esi, dword [esp + 0x18]
add esp, 4
cmp byte [esp + 0x12], 0
mov ecx, 0x410991
mov eax, ecx
mov edx, str.Not_a_file
cmove eax, edx
test esi, esi
push eax
mov eax, ecx
cmovne eax, esi
push eax
mov eax, str._r_nContent_Type:
cmove eax, ecx
push eax
push 0xa
push str.403_Forbidden
lea eax, [esp + 0x28]
push str.HTTP_1.1__s_r_nContent_length:__zd_r_nConnection:_close_s_s_r_n_r_n_s
push eax
call fcn.00401e30
add esp, 0x1c
test eax, eax
jns 0x403a7b
mov eax, dword [edi + 0x2c]
push str.asprintf_failed
push edi
call eax
add esp, 8
mov bl, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0040d125
mov esp, ebp
pop ebp
ret
push esi
call ebx
mov esi, dword [esp + 0x18]
add esp, 4
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403a90
mov eax, dword [edi + 0x1c]
sub ecx, edx
push ecx
push esi
push edi
call eax
add esp, 0xc
mov bl, al
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [esp + 0x60]
add esp, 4
mov al, bl
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040d125
mov esp, ebp
pop ebp
ret