Function at 0x404400
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
push edi
test ebx, ebx
jne 0x40444e
cmp byte [esi + 0x44], bl
jne 0x404444
mov byte [esi + 0x44], 1
mov dword [esi + 0x48], 2
mov edx, dword [str.Failed_to_open_file]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404428
sub eax, edi
push eax
push edx
lea ecx, [esi + 0x4c]
call fcn.00405b30
or eax, 0xffffffff
mov dword [esi + 0x70], eax
mov dword [esi + 0x6c], eax
pop edi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [esi + 0x18]
test edi, edi
je 0x404466
mov ecx, edi
mov eax, dword [ecx]
mov edx, dword [eax]
mov edi, dword [edi + 0x40]
push 1
call edx
test edi, edi
jne 0x404455
xor eax, eax
push 2
push eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
or edi, 0xffffffff
push ebx
mov dword [esi + 8], edi
mov dword [esi + 4], edi
call fcn.0041a9f0
push ebx
call fcn.0041a901
mov ebx, eax
mov eax, dword [ebp + 8]
push 0
push 0
push eax
mov dword [ebp - 4], ebx
call fcn.0041a9f0
add esp, 0x1c
test ebx, ebx
jg 0x4044e3
cmp byte [esi + 0x44], 0
jne 0x4044d9
mov byte [esi + 0x44], 1
mov dword [esi + 0x48], 0xc
mov edx, dword [str.Error_document_empty.]
mov eax, edx
lea ebx, [eax + 1]
jmp 0x4044c0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4044c0
sub eax, ebx
push eax
push edx
lea ecx, [esi + 0x4c]
call fcn.00405b30
mov dword [esi + 0x70], edi
mov dword [esi + 0x6c], edi
pop edi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebx + 1]
push ecx
call fcn.00419476
mov edx, dword [ebp + 8]
push edx
push 1
mov edi, eax
push ebx
push edi
mov byte [edi], 0
call fcn.0041a421
add esp, 0x14
cmp eax, 1
je 0x40453c
push edi
call fcn.004197c6
add esp, 4
cmp byte [esi + 0x44], 0
jne 0x404444
mov byte [esi + 0x44], 1
mov dword [esi + 0x48], 2
mov edx, dword [str.Failed_to_open_file]
mov eax, edx
lea edi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404530
jmp 0x40442f
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
mov dword [ebp + 8], eax
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
mov byte [esi + 0x75], 1
neg ecx
or ecx, eax
push ecx
call fcn.00419476
mov ebx, eax
mov eax, dword [ebp + 8]
lea ecx, [eax + eax + 2]
push ecx
push 0
push ebx
call fcn.0041c1a0
add esp, 0x10
cmp byte [edi], 0xff
jne 0x40458e
cmp byte [edi + 1], 0xfe
jne 0x40458e
mov edx, dword [ebp - 4]
add edx, 0xfffffffe
push edx
lea eax, [edi + 2]
push eax
jmp 0x404593
mov ecx, dword [ebp - 4]
push ecx
push edi
push ebx
call fcn.0041c550
add esp, 0xc
push edi
call fcn.004197c6
add esp, 4
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 4], eax
inc eax
push eax
call fcn.00419476
mov edi, eax
mov eax, dword [ebp - 4]
inc eax
push eax
push 0
push edi
call fcn.0041c1a0
mov edx, dword [ebp - 4]
add esp, 0x10
push 0
push 0
push edx
push edi
push 0xffffffffffffffff
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
call fcn.004197c6
mov edx, dword [ebp - 4]
add esp, 4
mov byte [edi + edx], 0
cmp byte [edi], 0
mov eax, edi
mov ecx, edi
je 0x40462c
jmp 0x404610
mov dl, byte [eax]
cmp dl, 0xd
jne 0x404623
mov byte [ecx], 0xa
inc eax
inc ecx
cmp byte [eax], 0xa
jne 0x404627
jmp 0x404626
mov byte [ecx], dl
inc ecx
inc eax
cmp byte [eax], 0
jne 0x404610
push 0
mov byte [ecx], 0
mov eax, dword [esi]
mov edx, dword [eax + 8]
push 0
push edi
mov ecx, esi
call edx
push edi
call fcn.004197c6
add esp, 4
xor eax, eax
cmp byte [esi + 0x44], al
pop edi
sete al
pop ebx
mov esp, ebp
pop ebp
ret 4