Function at 0x405500
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 0x40556a
mov esi, dword [ebx + 0xc]
add esi, esi
add esi, esi
jne 0x405521
mov dword [ebp - 8], esi
jmp 0x405570
push esi
call dword [sym.imp.MSVCR100.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x405559
push str._Out_of_memory._Please_run_a_smaller_problem_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 4
call fcn.00404c60
inc dword [0x437d8c]
je 0x405551
call fcn.004048c0
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 0x405570
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 0x405649
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.00405760
add esp, 0x14
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x405732
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 0x405732
test esi, esi
je 0x405732
mov edi, dword [ebp - 0x18]
dec edi
js 0x405732
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 + 0x20]
add edx, esi
push 0x24
push edx
call dword [sym.imp.MSVCR100.dll_strchr]
add esp, 8
test eax, eax
je 0x405716
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 0x405728
test esi, esi
je 0x4056bf
mov ecx, dword [ebp + 0x10]
cmp word [ecx + 8], 2
push edi
push 1
je 0x4056f3
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 0x405684
mov dword [ebp - 0xc], 1
jmp 0x405732
xor ecx, ecx
test esi, esi
jle 0x4056bf
fld dword [0x438ee0]
fld qword [0x4394f0]
mov edx, dword [ebp - 8]
fld dword [edx + ecx*4]
fcomp st(2)
fnstsw ax
test ah, 0x41
jne 0x4056b0
fld dword [edx + ecx*4]
mov edx, dword [ebp + 0xc]
fstp qword [edx + ecx*8]
jmp 0x4056b6
mov eax, dword [ebp + 0xc]
fst qword [eax + ecx*8]
inc ecx
cmp ecx, esi
jl 0x405696
fstp st(1)
fstp st(0)
test ebx, ebx
jle 0x4055cf
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 0x4056d0
mov esi, dword [ebp - 0x14]
jmp 0x4055cf
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 0x4056bf
mov dword [ebp - 0xc], 1
jmp 0x405732
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 0x405612
mov eax, dword [ebp + 0x10]
cmp word [eax + 8], 1
pop edi
pop esi
pop ebx
jne 0x405750
mov eax, dword [ebp - 8]
test eax, eax
je 0x405750
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret