Function at 0x578faa
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x6dad06
call fcn.006b9c3c
mov eax, 0x30f0
call fcn.0068aad0
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
push edi
mov dword [ebp - 0x7c], esi
mov edx, dword [ecx]
mov edi, edx
mov eax, dword [ecx + 0xc]
sar edi, 3
and edi, 0x1ff
mov dword [ebp - 0x18], eax
mov eax, dword [ecx + 8]
inc edi
and edx, 7
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x68], edx
je 0x578fe5
cmp edx, 2
je 0x578fe5
xor al, al
jmp 0x5795ae
xor eax, eax
lea ecx, [ebp - 0x64]
test edx, edx
push ebx
setne al
inc eax
mov ebx, eax
mov dword [ebp - 0x20], eax
imul ebx, dword [ebp - 0x18]
imul ebx, edi
mov dword [ebp - 0x30], ebx
call fcn.00576d27
and dword [ebp - 4], 0
lea ecx, [ebp - 0x64]
cmp dword [esi + 0x34], 0
je 0x579188
push dword [esi + 0x34]
call fcn.0057a43d
test al, al
je 0x579196
mov eax, 0x2000
mov esi, dword [esi + 0x34]
cdq
idiv ebx
xor ebx, ebx
mov ecx, eax
inc ebx
mov eax, dword [ebp - 0x2c]
cmp ecx, ebx
mov dword [ebp - 0x70], ebx
cmovl ecx, ebx
cmp ecx, eax
cmovg ecx, eax
dec eax
add eax, ecx
mov dword [ebp - 0x6c], ecx
cdq
idiv ecx
mov edi, eax
mov dword [ebp - 0x28], edi
test esi, esi
je 0x57907f
mov edx, dword [ebp - 0x30]
imul edx, dword [ebp - 0x2c]
mov eax, dword [esi + 8]
sub eax, dword [esi]
add edx, 0x1ff
lea edx, [edx + edi*8]
and edx, 0xffffff00
cmp eax, edx
jae 0x57907f
push edx
mov ecx, esi
call fcn.004120e6
lea eax, [ebp - 0x20d4]
mov dword [ebp - 0x20d8], 0x408
push edi
lea ecx, [ebp - 0x20dc]
mov dword [ebp - 0x20dc], eax
call fcn.00531d61
mov byte [ebp - 4], bl
lea eax, [ebp - 0x109c]
push edi
lea ecx, [ebp - 0x10a4]
mov dword [ebp - 0x10a4], eax
mov dword [ebp - 0x10a0], 0x808
call fcn.00531ea9
mov byte [ebp - 4], 2
lea eax, [ebp - 0x30f4]
mov dword [ebp - 0x30fc], eax
lea ecx, [ebp - 0x30fc]
mov eax, dword [ebp - 0x30]
add eax, 0x20
mov dword [ebp - 0x30f8], 0x1008
push eax
call fcn.00531e47
mov byte [ebp - 4], 3
xor esi, esi
mov eax, dword [ebp - 0x30fc]
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x20]
push 4
shl eax, 3
push 0x736ee0
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x10], esi
call fcn.0057a59a
push esi
lea ecx, [ebp - 0x64]
call fcn.0057a6be
and dword [ebp - 0x34], esi
test edi, edi
jle 0x579302
mov edi, dword [ebp - 0x6c]
lea ecx, [ebp - 0x64]
add edi, esi
mov esi, dword [ebp - 0x20dc]
cmp edi, dword [ebp - 0x2c]
cmovg edi, dword [ebp - 0x2c]
mov dword [ebp - 0x40], edi
call fcn.0057a4b4
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x10]
mov dword [esi + ecx*4], eax
cmp edx, edi
jge 0x5792d1
mov esi, dword [ebp - 0x24]
cmp esi, 3
jne 0x5791af
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0x14]
push ebx
push dword [ebp - 0x18]
mov ecx, dword [edi + 0x30]
push ecx
imul ecx, edx
push esi
add ecx, dword [edi + 0x10]
cmp dword [ebp - 0x68], 0
jne 0x57919f
call fcn.0057a9f3
jmp 0x5791a4
lea eax, [esi + 0x1c]
push eax
call fcn.0057a3f4
jmp 0x57901e
mov byte [ebp - 0x70], 0
jmp 0x57959e
call fcn.0057aa43
mov edx, dword [ebp - 0x10]
add esp, 0x10
jmp 0x5792a3
cmp esi, 4
jne 0x57929d
cmp dword [ebp - 0x68], 0
mov ecx, dword [ebp - 0x14]
jne 0x579223
mov edi, dword [ebp + 8]
mov eax, ebx
mov dword [ebp - 0x20], ecx
mov esi, dword [edi + 0x30]
imul esi, edx
mov edx, dword [ebp - 0x18]
mov ecx, edx
add esi, dword [edi + 0x10]
mov edi, dword [ebp - 0x20]
shl ecx, 2
mov dword [ebp - 0x3c], ecx
dec eax
mov dword [ebp - 0x20], eax
test edx, edx
jle 0x579216
mov dword [ebp - 0x1c], edx
mov bl, byte [esi]
mov cl, byte [esi + 1]
mov al, byte [esi + 2]
mov dl, byte [esi + 3]
add esi, 4
mov byte [edi], al
mov byte [edi + 1], cl
mov byte [edi + 2], bl
mov byte [edi + 3], dl
add edi, 4
sub dword [ebp - 0x1c], 1
jne 0x5791eb
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x18]
sub esi, ecx
sub edi, ecx
test eax, eax
jne 0x5791e0
xor ebx, ebx
inc ebx
jmp 0x57929a
mov eax, dword [ebp + 8]
mov edx, ebx
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, esi
mov edi, dword [eax + 0x30]
imul edi, dword [ebp - 0x10]
add edi, dword [eax + 0x10]
mov eax, dword [ebp - 0x1c]
shl ecx, 3
mov dword [ebp - 0x78], ecx
dec edx
mov dword [ebp - 0x74], edx
test esi, esi
jle 0x57928f
mov dword [ebp - 0x20], esi
movzx esi, word [edi]
movzx eax, word [edi + 4]
movzx ecx, word [edi + 2]
movzx edx, word [edi + 6]
add edi, 8
mov dword [ebp - 0x3c], esi
mov esi, dword [ebp - 0x1c]
mov word [esi], ax
mov eax, esi
mov esi, dword [ebp - 0x3c]
mov word [eax + 2], cx
mov word [eax + 4], si
mov word [eax + 6], dx
add eax, 8
sub dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], eax
jne 0x57924e
mov edx, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x78]
mov esi, dword [ebp - 0x18]
sub eax, ecx
sub edi, ecx
mov dword [ebp - 0x1c], eax
test edx, edx
jne 0x579243
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0x14]
cmp dword [ebp - 0x24], ebx
jbe 0x5792ac
mov eax, esi
jmp 0x5792b5
mov eax, dword [edi + 0x30]
imul eax, edx
add eax, dword [edi + 0x10]
push dword [ebp - 0x30]
lea ecx, [ebp - 0x64]
push eax
call fcn.0057a59a
mov edx, dword [ebp - 0x10]
inc edx
mov dword [ebp - 0x10], edx
cmp edx, dword [ebp - 0x40]
jl 0x57915e
mov esi, dword [ebp - 0x20dc]
lea ecx, [ebp - 0x64]
mov edi, dword [ebp - 0x10a4]
call fcn.0057a4b4
mov ecx, dword [ebp - 0x34]
sub ax, word [esi + ecx*4]
mov esi, dword [ebp - 0x10]
mov word [edi + ecx*2], ax
inc ecx
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x34], ecx
cmp ecx, edi
jl 0x579130
cmp edi, 2
jle 0x579362
lea ecx, [ebp - 0x64]
call fcn.0057a4b4
xor esi, esi
mov dword [ebp + 8], eax
test edi, edi
jle 0x57932e
mov ecx, dword [ebp - 0x20dc]
push dword [ecx + esi*4]
lea ecx, [ebp - 0x64]
call fcn.0057a6be
inc esi
cmp esi, edi
jl 0x579318
lea ecx, [ebp - 0x64]
call fcn.0057a4b4
xor edi, edi
mov esi, eax
mov dword [ebp - 0x40], esi
cmp dword [ebp - 0x28], edi
jle 0x5793b2
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10a4]
movsx ecx, word [ecx + edi*2]
push ecx
lea ecx, [ebp - 0x64]
call fcn.0057a672
inc edi
cmp edi, esi
jl 0x579345
mov esi, dword [ebp - 0x40]
jmp 0x5793b2
jne 0x57939e
lea ecx, [ebp - 0x64]
call fcn.0057a4b4
mov dword [ebp + 8], eax
xor esi, esi
mov eax, dword [ebp - 0x20dc]
lea ecx, [ebp - 0x64]
push dword [esi + eax]
call fcn.0057a6be
add esi, 4
cmp esi, 8
jl 0x579371
mov eax, dword [ebp - 0x10a4]
movsx esi, word [eax + 2]
movsx eax, word [eax]
shl esi, 0x10
add esi, eax
jmp 0x5793b2
mov eax, dword [ebp - 0x20dc]
mov eax, dword [eax]
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x10a4]
movsx esi, word [eax]
cmp dword [ebp - 0x24], ebx
jbe 0x5793f1
lea ecx, [ebp - 0x64]
call fcn.0057a4b4
mov ebx, dword [ebp - 0x38]
lea ecx, [ebp - 0x64]
push ebx
mov edi, eax
call fcn.0057a672
push ebx
lea ecx, [ebp - 0x64]
call fcn.0057a672
push ebx
lea ecx, [ebp - 0x64]
call fcn.0057a672
cmp dword [ebp - 0x24], 4
jne 0x5793ee
push ebx
lea ecx, [ebp - 0x64]
call fcn.0057a672
mov dword [ebp - 0x38], edi
lea ecx, [ebp - 0x64]
call fcn.0057a4b4
push 9
lea ecx, [ebp - 0x64]
mov ebx, eax
call fcn.0057a672
push dword [ebp - 0x18]
xor edi, edi
lea eax, [ebp - 0x64]
inc edi
push edi
push 4
push 0x100
push eax
call fcn.00578f63
push dword [ebp - 0x2c]
lea eax, [ebp - 0x64]
push edi
push 4
push 0x101
push eax
call fcn.00578f63
push dword [ebp - 0x38]
mov edi, dword [ebp - 0x24]
lea eax, [ebp - 0x64]
push edi
push 3
push 0x102
push eax
call fcn.00578f63
xor eax, eax
inc eax
push eax
push eax
push 4
push 0x103
lea eax, [ebp - 0x64]
push eax
call fcn.00578f63
xor ecx, ecx
xor eax, eax
inc ecx
cmp edi, ecx
seta al
inc eax
push eax
push ecx
push 3
push 0x106
lea eax, [ebp - 0x64]
push eax
call fcn.00578f63
push dword [ebp + 8]
lea eax, [ebp - 0x64]
push dword [ebp - 0x28]
push 4
push 0x111
push eax
call fcn.00578f63
push edi
xor edi, edi
lea eax, [ebp - 0x64]
inc edi
push edi
push 3
push 0x115
push eax
call fcn.00578f63
push dword [ebp - 0x6c]
lea eax, [ebp - 0x64]
push edi
push 4
push 0x116
push eax
call fcn.00578f63
mov ecx, dword [ebp - 0x28]
xor eax, eax
cmp ecx, edi
push esi
push ecx
setle al
add eax, 3
push eax
push 0x117
lea eax, [ebp - 0x64]
push eax
call fcn.00578f63
push 0
lea ecx, [ebp - 0x64]
call fcn.0057a6be
lea ecx, [ebp - 0x64]
call fcn.0057a46a
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx + 0x34]
test eax, eax
je 0x57951e
mov eax, dword [eax]
mov ecx, ebx
sar ecx, 8
mov byte [eax + 4], bl
mov eax, dword [edx + 0x34]
mov eax, dword [eax]
mov byte [eax + 5], cl
mov ecx, ebx
mov eax, dword [edx + 0x34]
sar ecx, 0x10
sar ebx, 0x18
mov eax, dword [eax]
mov byte [eax + 6], cl
mov eax, dword [edx + 0x34]
mov eax, dword [eax]
mov byte [eax + 7], bl
jmp 0x579571
lea eax, [edx + 0x1c]
cmp dword [eax + 0x14], 0x10
jb 0x579529
mov eax, dword [eax]
push 0x7449a4
push eax
call fcn.006a14d7
mov esi, eax
mov ecx, ebx
mov eax, dword [ebp - 0x14]
sar ecx, 8
push 0
push 4
mov byte [eax + 1], cl
mov ecx, ebx
mov byte [eax], bl
sar ecx, 0x10
sar ebx, 0x18
push esi
mov byte [eax + 2], cl
mov byte [eax + 3], bl
call fcn.0069f669
mov ecx, dword [ebp - 0x14]
push esi
push 4
push edi
push ecx
call fcn.0069c339
push esi
call fcn.0069a717
add esp, 0x28
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30fc]
call fcn.00531e28
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10a4]
call fcn.00531e8a
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x20dc]
call fcn.00531d42
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.0057a542
mov al, byte [ebp - 0x70]
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8