Function at 0x4542c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0xc], str._Id:_fbwrite.cpp_7003_2011_05_16_16:32:53Z_jsturton___WORKNC
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x320]
and ecx, 0xfffffffb
mov edx, dword [ebp + 8]
mov dword [edx + 0x320], ecx
call fcn.00451f40
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp dword [eax + 0x2b8], 1
je 0x45432b
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x2b8], 2
je 0x45432b
push 0
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x2b0]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.MSVCR90.dll_fseek]
add esp, 0xc
mov eax, dword [ebp - 8]
mov dword [eax + 0x2b8], 2
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx + 0x2aa]
test edx, edx
je 0x4545df
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x2c8]
sub edx, dword [ecx + 0x2c4]
mov word [ebp - 4], dx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov dx, word [ecx + 0x2c2]
mov word [eax + 0x2be], dx
mov eax, dword [ebp + 8]
mov cx, word [ebp - 4]
mov word [eax + 0x2bc], cx
mov edx, dword [ebp + 8]
movsx eax, byte [edx + 0x2ab]
test eax, eax
je 0x45442d
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x31a]
test edx, edx
je 0x45440b
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x316]
add ecx, 5
cmp ecx, 0x3f
jle 0x4543b1
mov eax, 0xffffffe1
jmp 0x4546e8
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x316]
add eax, 5
mov ecx, dword [ebp + 8]
mov word [ecx + 0x316], ax
mov edx, dword [ebp + 8]
movsx eax, byte [edx + 0x318]
push eax
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x31a]
push edx
push str._03d_c
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x310]
push ecx
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0x10
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x310]
add eax, 5
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x310], eax
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x316]
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x2bc]
lea eax, [edx + eax + 1]
mov ecx, dword [ebp + 8]
mov word [ecx + 0x2bc], ax
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x2bc]
mov word [edx + 0x2c2], cx
xor edx, edx
mov eax, dword [ebp + 8]
mov word [eax + 0x2c0], dx
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x2b0]
mov dword [ecx + 0x218], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x2bc]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x320]
shr ecx, 1
and ecx, 1
je 0x4544cd
lea edx, [ebp - 0xe]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
mov dl, byte [ecx]
mov byte [ebp - 0x15], dl
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x1c]
mov cl, byte [ebp - 0x15]
mov byte [eax], cl
lea edx, [ebp - 0x10]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
mov dl, byte [ecx]
mov byte [ebp - 0x21], dl
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x28]
mov cl, byte [ebp - 0x21]
mov byte [eax], cl
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
push eax
push 4
push 1
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x4544f4
mov eax, 0xffffffe6
jmp 0x4546e8
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x2b0]
add eax, 4
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x2b0], eax
mov edx, dword [ebp + 8]
movsx eax, byte [edx + 0x2ab]
test eax, eax
je 0x45457c
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x316]
add ecx, 1
push ecx
push 1
mov edx, dword [ebp + 8]
add edx, 0x2d0
push edx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x316]
add edx, 1
cmp eax, edx
je 0x45455c
mov eax, 0xffffffe6
jmp 0x4546e8
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x316]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x2b0]
lea ecx, [ecx + eax + 1]
mov edx, dword [ebp + 8]
mov dword [edx + 0x2b0], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
push ecx
movzx edx, word [ebp - 4]
push edx
push 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2c4]
push ecx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
movzx edx, word [ebp - 4]
cmp eax, edx
je 0x4545af
mov eax, 0xffffffe6
jmp 0x4546e8
movzx eax, word [ebp - 4]
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x2b0]
mov edx, dword [ebp + 8]
mov dword [edx + 0x2b0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x220]
add ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 0x220], ecx
jmp 0x4546d9
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2b4], 0
jne 0x454639
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
push edx
push 0x80
push 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2c4]
push ecx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
cmp eax, 0x80
je 0x45461d
mov eax, 0xffffffe6
jmp 0x4546e8
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x2b0]
add eax, 0x80
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x2b0], eax
jmp 0x4546d9
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x31c]
push edx
push 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2c4]
push ecx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
mov edx, dword [ebp + 8]
movsx ecx, word [edx + 0x31c]
cmp eax, ecx
je 0x454675
mov eax, 0xffffffe6
jmp 0x4546e8
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x31c]
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x2b0]
mov edx, dword [ebp + 8]
mov dword [edx + 0x2b0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x220]
add ecx, 1
mov edx, dword [ebp + 8]
cmp dword [edx + 0x2b4], ecx
jne 0x4546d9
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x220]
add ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 0x220], ecx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x31c]
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x218]
mov eax, dword [ebp + 8]
mov dword [eax + 0x218], ecx
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x2b8], 1
xor eax, eax
mov esp, ebp
pop ebp
ret