Function at 0x404a20
Capabilities:
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0x10]
cmp word [ebx + 8], 1
push esi
push edi
jne 0x404a8a
mov esi, dword [ebx + 0xc]
add esi, esi
add esi, esi
jne 0x404a41
mov dword [ebp - 8], esi
jmp 0x404a90
push esi
call dword [sym.imp.MSVCR100.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x404a79
push str._Out_of_memory._Please_run_a_smaller_problem_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 4
call fcn.00404240
inc dword [0x42fba4]
je 0x404a71
call fcn.00403eb0
push 3
call dword [sym.imp.MSVCR100.dll_exit]
push esi
push 0
push edi
call sub.MSVCR100.dll_memset
add esp, 0xc
mov dword [ebp - 8], edi
jmp 0x404a90
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov edi, dword [ebx]
movsx ecx, word [ebx + 0xa]
mov esi, dword [ebx + 0xc]
mov ebx, dword [ebx + 0x10]
push edi
push 1
lea edx, [ebp - 1]
push 1
push edx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], esi
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
cmp byte [ebp - 1], 0x81
jne 0x404b69
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 8]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ecx
push edx
mov edx, dword [ebp - 8]
push eax
push ebx
push esi
mov ecx, edi
call fcn.00404c80
add esp, 0x14
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x404c52
push edi
push 1
lea eax, [ebp - 1]
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
test ebx, ebx
je 0x404c52
test esi, esi
je 0x404c52
mov edi, dword [ebp - 0x18]
dec edi
js 0x404c52
mov ecx, dword [ebp - 0x14]
imul ebx, ebx, 0xd
mov edx, dword [ebp + 0xc]
mov esi, edi
lea eax, [edx + ecx*8]
imul esi, esi, 0xd
add ebx, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0x1c]
add edx, esi
push 0x24
push edx
call dword [sym.imp.MSVCR100.dll_strchr]
add esp, 8
test eax, eax
je 0x404c36
mov eax, dword [ebp + 8]
push 0xd
sub ebx, 0xd
lea ecx, [esi + eax]
push ebx
push ecx
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
jmp 0x404c48
test esi, esi
je 0x404bdf
mov ecx, dword [ebp + 0x10]
cmp word [ecx + 8], 2
push edi
push 1
je 0x404c13
mov eax, dword [ebp - 8]
lea edx, [esi*4]
push edx
push eax
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x404ba4
mov dword [ebp - 0xc], 1
jmp 0x404c52
xor ecx, ecx
test esi, esi
jle 0x404bdf
fld dword [0x430ba8]
fld qword [0x430d18]
mov edx, dword [ebp - 8]
fld dword [edx + ecx*4]
fcomp st(2)
fnstsw ax
test ah, 0x41
jne 0x404bd0
fld dword [edx + ecx*4]
mov edx, dword [ebp + 0xc]
fstp qword [edx + ecx*8]
jmp 0x404bd6
mov eax, dword [ebp + 0xc]
fst qword [eax + ecx*8]
inc ecx
cmp ecx, esi
jl 0x404bb6
fstp st(1)
fstp st(0)
test ebx, ebx
jle 0x404aef
mov esi, dword [ebp + 8]
mov dword [ebp - 0x10], ebx
lea ecx, [ecx]
push edi
push 1
push 0xc
push esi
call dword [sym.imp.MSVCR100.dll_fread]
mov byte [esi + 0xc], 0
add esp, 0x10
add esi, 0xd
dec dword [ebp - 0x10]
jne 0x404bf0
mov esi, dword [ebp - 0x14]
jmp 0x404aef
mov edx, dword [ebp + 0xc]
lea ecx, [esi*8]
push ecx
push edx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x404bdf
mov dword [ebp - 0xc], 1
jmp 0x404c52
mov eax, dword [ebp - 0x14]
fld qword [eax - 8]
mov edx, dword [ebp + 0xc]
sub eax, 8
fstp qword [edx + edi*8]
mov dword [ebp - 0x14], eax
sub esi, 0xd
dec edi
jns 0x404b32
mov eax, dword [ebp + 0x10]
cmp word [eax + 8], 1
pop edi
pop esi
pop ebx
jne 0x404c70
mov eax, dword [ebp - 8]
test eax, eax
je 0x404c70
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret