Function at 0x40548b
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10a0
call fcn.00406230
mov dword [ebp - 0x100c], 0
mov dword [ebp - 0x1004], 1
mov dword [ebp - 0x1020], 0
mov dword [ebp - 0x1008], 0
jmp 0x4054d1
mov eax, dword [ebp - 0x1008]
add eax, 1
mov dword [ebp - 0x1008], eax
mov ecx, dword [ebp - 0x1008]
cmp ecx, dword [0x40c010]
jge 0x405508
push 0
mov edx, dword [ebp - 0x1008]
push edx
push 0x150
mov eax, dword [0x40bf10]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp - 0x1008]
mov dword [ecx*4 + 0x40c014], eax
jmp 0x4054c2
mov dword [ebp - 0x1014], 0
mov edx, dword [ebp - 0x100c]
push edx
lea eax, [ebp - 0x1020]
push eax
push 0x1000
lea ecx, [ebp - 0x1000]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0040502e
add esp, 0x14
test eax, eax
je 0x4056f3
cmp dword [ebp - 0x1020], 0
jne 0x40554e
jmp 0x4056f3
mov eax, dword [ebp - 0x1020]
mov dword [ebp - 0x1010], eax
lea ecx, [ebp - 0x1000]
mov dword [ebp - 0x1018], ecx
cmp dword [ebp - 0x1020], 0
je 0x405697
mov edx, dword [ebp - 0x1014]
mov eax, dword [ebp - 0x1020]
sub eax, dword [edx*4 + 0x40c014]
test eax, eax
jl 0x405697
mov ecx, dword [ebp - 0x1014]
mov edx, dword [ecx*4 + 0x40c014]
push edx
mov eax, dword [ebp - 0x1018]
push eax
mov ecx, dword [ebp - 0x1018]
push ecx
call fcn.00404f78
add esp, 0xc
mov edx, dword [ebp - 0x1014]
mov eax, dword [ebp - 0x1018]
add eax, dword [edx*4 + 0x40c014]
mov dword [ebp - 0x1018], eax
mov ecx, dword [ebp - 0x1014]
mov edx, dword [ebp - 0x1020]
sub edx, dword [ecx*4 + 0x40c014]
mov dword [ebp - 0x1020], edx
mov eax, dword [ebp - 0x1014]
mov ecx, dword [ebp + 0x10]
sub ecx, dword [eax*4 + 0x40c014]
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp - 0x1014]
add edx, 1
mov dword [ebp - 0x1014], edx
mov eax, dword [ebp - 0x1014]
cmp eax, dword [0x40c010]
jne 0x405692
mov dword [ebp - 0x1014], 0
cmp dword [ebp - 0x1020], 2
jb 0x405692
mov ecx, dword [ebp - 0x1018]
movsx edx, byte [ecx]
cmp edx, 0xd
je 0x40563a
jmp 0x405702
mov eax, dword [ebp - 0x1018]
add eax, 1
mov dword [ebp - 0x1018], eax
mov ecx, dword [ebp - 0x1018]
movsx edx, byte [ecx]
cmp edx, 0xa
je 0x40565c
jmp 0x405702
mov eax, dword [ebp - 0x1018]
add eax, 1
mov dword [ebp - 0x1018], eax
mov ecx, dword [ebp - 0x1020]
sub ecx, 2
mov dword [ebp - 0x1020], ecx
mov edx, dword [ebp + 0x10]
sub edx, 2
mov dword [ebp + 0x10], edx
mov eax, dword [ebp - 0x1004]
add eax, 1
mov dword [ebp - 0x1004], eax
jmp 0x405566
mov ecx, dword [ebp - 0x1010]
cmp ecx, dword [ebp - 0x1020]
jne 0x4056a7
jmp 0x405702
mov dword [ebp - 0x101c], 0
push 0
lea edx, [ebp - 0x101c]
push edx
mov eax, dword [ebp - 0x1010]
sub eax, dword [ebp - 0x1020]
push eax
lea ecx, [ebp - 0x1000]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x1020]
mov dword [ebp - 0x100c], eax
mov dword [ebp - 0x1020], 0
jmp 0x405512
cmp dword [ebp + 0x10], 0
je 0x4056fb
jmp 0x405702
mov eax, 1
jmp 0x40573b
mov ecx, dword [ebp - 0x1004]
push ecx
push str.The_format_of_the_file_doesnt_match_the_specification_in_record__d.
lea edx, [ebp - 0x10a0]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x30
push 0x40b5c4
lea eax, [ebp - 0x10a0]
push eax
mov ecx, dword [0x40bef0]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
mov esp, ebp
pop ebp
ret