Function at 0x4398b6
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x67e2d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ebx
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x10]
push edi
shl esi, 5
push esi
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x28], eax
call fcn.0059b115
push esi
mov edi, eax
push 0
push edi
mov dword [ebp - 0x30], edi
call fcn.0056b050
xor eax, eax
add esp, 0x10
mov dword [ebp - 0x20], eax
test ebx, ebx
jle 0x439930
mov dword [ebp - 0x24], edi
mov ecx, dword [ebp - 0x34]
push dword [ecx + eax*4]
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x58]
push eax
call fcn.00439be3
push 8
mov esi, eax
mov eax, dword [ebp - 0x20]
pop ecx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x24]
inc eax
add edi, 0x20
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], edi
cmp eax, ebx
jl 0x439903
xor esi, esi
mov word [ebp - 0x18], bx
push 0x5fae28
push dword [ebp - 0x28]
xor eax, eax
inc esi
mov word [ebp - 0x1c], ax
mov word [ebp - 0x1a], si
call fcn.005882cc
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x439b25
push edi
push esi
lea eax, [ebp - 0x1c]
push 2
push eax
call fcn.00598306
push edi
push esi
lea eax, [ebp - 0x1a]
push 2
push eax
call fcn.00598306
push edi
push esi
lea eax, [ebp - 0x18]
push 2
push eax
call fcn.00598306
push edi
call fcn.0059806b
mov esi, ebx
mov dword [ebp - 0x34], eax
shl esi, 4
push esi
mov dword [ebp - 0x2c], 0x10
call fcn.0059b115
push esi
push 0
push eax
mov dword [ebp - 0x20], eax
call fcn.0056b050
mov ecx, dword [ebp - 0x2c]
add esp, 0x44
imul ecx, ebx
xor esi, esi
test ecx, ecx
jle 0x4399d4
xor eax, eax
inc eax
push edi
push eax
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00598306
mov eax, dword [ebp - 0x2c]
add esp, 0x10
imul eax, ebx
inc esi
cmp esi, eax
jl 0x4399b7
test ebx, ebx
jle 0x439a4e
mov eax, dword [ebp - 0x30]
add eax, 0x14
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x38]
add eax, 2
mov dword [ebp - 0x28], eax
mov esi, eax
push edi
call fcn.0059806b
mov dword [esi + 0xa], eax
xor ecx, ecx
mov al, byte [ebx - 0x14]
inc ecx
mov byte [esi - 2], al
mov al, byte [ebx - 0x10]
mov byte [esi - 1], al
mov eax, dword [ebx]
push edi
push ecx
mov al, byte [eax + 0x20]
mov byte [esi], al
mov ax, word [ebx - 0xc]
mov word [esi + 4], ax
mov word [esi + 2], cx
mov eax, dword [ebx]
and dword [eax + 0x14], 0
push dword [ebx - 4]
push dword [ebx - 8]
call fcn.00598306
push edi
call fcn.0059806b
sub eax, dword [esi + 0xa]
lea ebx, [ebx + 0x20]
add esp, 0x18
mov dword [esi + 6], eax
sub dword [ebp - 0x24], 1
lea esi, [esi + 0x10]
jne 0x4399f2
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x20]
push 0
push dword [ebp - 0x34]
push edi
call fcn.00597a35
add esp, 0xc
test ebx, ebx
jle 0x439aef
add esi, 2
mov dword [ebp - 0x28], ebx
xor eax, eax
inc eax
push edi
push eax
push eax
lea eax, [esi - 2]
push eax
call fcn.00598306
xor eax, eax
inc eax
push edi
push eax
push eax
lea eax, [esi - 1]
push eax
call fcn.00598306
xor eax, eax
push edi
inc eax
push eax
push eax
push esi
call fcn.00598306
xor eax, eax
inc eax
push edi
push eax
push eax
lea eax, [esi + 1]
push eax
call fcn.00598306
add esp, 0x40
lea eax, [esi + 2]
push edi
push 1
push 2
push eax
call fcn.00598306
push edi
push 1
lea eax, [esi + 4]
push 2
push eax
call fcn.00598306
push edi
push 1
lea eax, [esi + 6]
push 4
push eax
call fcn.00598306
push edi
push 1
lea eax, [esi + 0xa]
push 4
push eax
call fcn.00598306
add esp, 0x40
add esi, 0x10
sub ebx, 1
jne 0x439a6d
mov ebx, dword [ebp + 0xc]
push edi
call fcn.00587fe2
push dword [ebp - 0x20]
call fcn.00576006
pop ecx
pop ecx
test ebx, ebx
jle 0x439b19
mov esi, dword [ebp - 0x30]
add esi, 0xc
push dword [esi]
call fcn.00576006
lea esi, [esi + 0x20]
pop ecx
sub ebx, 1
jne 0x439b09
push dword [ebp - 0x30]
call fcn.00576006
xor eax, eax
pop ecx
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00506d7f
mov esp, ebp
pop ebp
ret 0xc