Function at 0x530830
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x54
push ebx
push ebp
mov ebp, dword [esp + 0x60]
push esi
xor esi, esi
push edi
mov eax, dword [ebp + 0x758c]
cmp eax, esi
je 0x530850
push eax
call sub.MSVCRT.dll_free
add esp, 4
fild dword [ebp + 0x7590]
sub esp, 8
fmul qword [0x57c0f8]
fadd qword [0x57c0f0]
fmul qword [0x57c0e8]
fstp qword [esp]
call sub.MSVCRT.dll_floor
fmul qword [0x57c0e0]
call sub.MSVCRT.dll__ftol
mov edi, eax
mov eax, dword [ebp + 0x7594]
imul eax, edi
push eax
mov dword [esp + 0x34], edi
call sub.MSVCRT.dll_malloc
mov cl, byte [ebp + 0x14]
mov ebx, eax
push ecx
call fcn.0052bf80
mov dl, byte [ebp + 0x15]
shl eax, 4
push edx
mov dword [esp + 0x7c], eax
call fcn.0052bf80
mov ecx, dword [esp + 0x7c]
mov dl, byte [ebp + 0x16]
add ecx, eax
push edx
mov dword [esp + 0x3c], ecx
call fcn.0052bf80
shl eax, 4
mov dword [esp + 0x80], eax
mov al, byte [ebp + 0x17]
push eax
call fcn.0052bf80
mov ecx, dword [esp + 0x84]
mov dl, byte [ebp + 0x18]
add ecx, eax
push edx
mov dword [esp + 0x40], ecx
call fcn.0052bf80
shl eax, 4
mov dword [esp + 0x88], eax
mov al, byte [ebp + 0x19]
push eax
call fcn.0052bf80
mov ecx, dword [esp + 0x8c]
mov dl, byte [ebp + 0x1e]
add ecx, eax
push edx
mov dword [esp + 0x44], ecx
call fcn.0052bf80
shl eax, 4
mov dword [esp + 0x90], eax
mov al, byte [ebp + 0x1f]
push eax
call fcn.0052bf80
mov ecx, dword [esp + 0x94]
mov dl, byte [ebp + 0x20]
add ecx, eax
push edx
mov dword [esp + 0x48], ecx
call fcn.0052bf80
shl eax, 4
mov dword [esp + 0x98], eax
mov al, byte [ebp + 0x21]
push eax
call fcn.0052bf80
mov ecx, dword [esp + 0x9c]
mov dl, byte [ebp + 0x22]
add ecx, eax
push edx
mov dword [esp + 0x4c], ecx
call fcn.0052bf80
shl eax, 4
mov dword [esp + 0xa0], eax
mov al, byte [ebp + 0x23]
push eax
call fcn.0052bf80
add esp, 0x3c
mov edx, dword [esp + 0x68]
mov dword [esp + 0x68], esi
add edx, eax
mov eax, dword [ebp + 0x7594]
cmp eax, esi
jle 0x530a1c
mov dword [esp + 0x10], esi
mov ecx, dword [ebp + 0x7590]
cmp ecx, esi
jle 0x5309fb
mov eax, dword [esp + 0x10]
mov edi, dword [ebp + 0x7594]
sub edi, dword [esp + 0x68]
dec edi
imul edi, ecx
mov ecx, dword [esp + 0x6c]
add edi, esi
cmp byte [edi + ecx], 0x31
je 0x5309d0
mov cl, byte [esp + 0x14]
mov byte [eax + ebx], dl
mov byte [eax + ebx + 1], cl
mov cl, byte [esp + 0x18]
jmp 0x5309e3
mov cl, byte [esp + 0x1c]
mov byte [eax + ebx], cl
mov cl, byte [esp + 0x20]
mov byte [eax + ebx + 1], cl
mov cl, byte [esp + 0x24]
mov byte [eax + ebx + 2], cl
mov ecx, dword [ebp + 0x7590]
inc esi
add eax, 3
cmp esi, ecx
jl 0x5309a5
mov edi, dword [esp + 0x28]
xor esi, esi
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x68]
add ecx, edi
inc eax
mov dword [esp + 0x10], ecx
mov ecx, dword [ebp + 0x7594]
cmp eax, ecx
mov dword [esp + 0x68], eax
jl 0x530997
mov ecx, dword [ebp + 0x7594]
mov edx, dword [ebp + 0x7590]
mov eax, ecx
mov word [esp + 0x2c], 0x4d42
imul eax, edi
mov dword [esp + 0x6c], eax
mov dword [ebp + 0x7598], eax
lea edi, [eax + 0x36]
mov dword [esp + 0x32], esi
push edi
mov dword [esp + 0x32], edi
mov dword [esp + 0x3a], 0x36
mov dword [esp + 0x40], 0x28
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], ecx
mov word [esp + 0x4c], 1
mov word [esp + 0x4e], 0x18
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
call sub.MSVCRT.dll_malloc
mov ecx, edi
mov edx, eax
mov esi, ecx
or eax, 0xffffffff
mov edi, edx
mov dword [esp + 0x6c], edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
lea esi, [esp + 0x40]
and ecx, 3
add esp, 4
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x2c]
mov eax, edx
mov dword [eax], ecx
mov ecx, dword [esp + 0x30]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x34]
mov dword [eax + 8], ecx
mov cx, word [esp + 0x38]
mov word [eax + 0xc], cx
lea eax, [edx + 0xe]
mov ecx, 0xa
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x6c]
mov esi, ebx
mov edx, ecx
lea edi, [eax + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test byte [ebp + 0x10], 8
je 0x530b7b
mov eax, dword [sym.imp.MSVCRT.dll_strncmp]
push 0x8000
push eax
call sub.MSVCRT.dll__setmode
add esp, 8
cmp eax, 0xffffffff
jne 0x530b45
lea edi, [ebp + 0x7528]
mov ecx, 7
mov esi, str.600:_Cant_open_output_file
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x68]
push ecx
call sub.MSVCRT.dll_free
push ebx
call sub.MSVCRT.dll_free
add esp, 8
mov eax, 0xa
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov esi, sym.imp.MSVCRT.dll__setjmp3
mov ecx, dword [esp + 0x2e]
mov edi, dword [esp + 0x68]
push esi
push 1
push ecx
push edi
call sub.MSVCRT.dll_fwrite
push esi
call sub.MSVCRT.dll_fclose
push edi
call sub.MSVCRT.dll_free
push ebx
call sub.MSVCRT.dll_free
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
lea edx, [ebp + 0x28]
push 0x58518c
push edx
call sub.MSVCRT.dll_fopen
mov esi, eax
add esp, 8
test esi, esi
jne 0x530b4a
mov eax, dword [esp + 0x68]
push eax
call sub.MSVCRT.dll_free
push ebx
call sub.MSVCRT.dll_free
lea edi, [ebp + 0x7528]
mov ecx, 7
mov esi, str.601:_Cant_open_output_file
add esp, 8
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebp
mov eax, 0xa
pop ebx
add esp, 0x54
ret