Function at 0x4aa240
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0xa8]
push esi
push edi
mov edi, dword [ebp + 0xc]
xor esi, esi
push eax
mov dword [ebp - 0xac], ebx
mov dword [ebp - 0xbc], edi
mov dword [ebp - 0xcc], esi
call fcn.00458dd0
mov eax, dword [0x5d317c]
mov esi, 8
movzx ecx, word [edi + 0x24]
add esp, 4
movq xmm0, qword [str.Windows_Icon]
mov dword [ebp - 0x7c], eax
mov al, byte [0x5d3180]
lea edx, [esi - 7]
mov byte [ebp - 0x78], al
mov eax, 0x10
mov word [ebp - 0xa4], ax
mov eax, 0x7f0
movq qword [ebp - 0x84], xmm0
cmp cx, ax
jne 0x4aa2d4
xor eax, eax
cmp word [edi + 0x28], 0x18
setne al
lea eax, [eax*8 + 0x18]
jmp 0x4aa300
movzx eax, word [edi + 0x34]
cmp ax, 0x10
jle 0x4aa2e3
mov ax, si
jmp 0x4aa300
cmp ax, 4
jle 0x4aa2f0
mov eax, 4
jmp 0x4aa300
cmp ax, 2
jle 0x4aa2fd
mov eax, 2
jmp 0x4aa300
mov ax, dx
mov word [ebp - 0x9c], dx
mov edx, 0x7f0
mov word [ebp - 0x9a], ax
cmp cx, dx
jne 0x4aa337
xor ecx, ecx
mov dword [ebp - 0x8c], ecx
cmp ax, 0x20
jne 0x4aa32f
or dword [ebp - 0xa8], 0x20
jmp 0x4aa341
or dword [ebp - 0xa8], esi
jmp 0x4aa341
mov dword [ebp - 0x8c], 0x80100
mov esi, dword [edi + 0x2c]
cwde
imul eax, esi
cdq
and edx, 7
lea ecx, [edx + eax]
sar ecx, 3
mov dword [ebp - 0x90], ecx
test cl, 3
je 0x4aa369
and ecx, 0xfffffffc
add ecx, 4
mov dword [ebp - 0x90], ecx
lea eax, [esi + 7]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ebp - 0xb0], eax
test al, 3
je 0x4aa38b
and eax, 0xfffffffc
add eax, 4
mov dword [ebp - 0xb0], eax
push dword [ebx]
lea esi, [eax + ecx]
imul esi, dword [edi + 0x30]
call fcn.005960c7
mov ecx, dword [ebp - 0xac]
mov ebx, eax
push 0
push dword [ebp + 0x10]
push dword [ecx]
call fcn.00595cb4
movsx eax, word [ebp - 0x9a]
push ebx
push esi
push eax
push dword [edi + 0x30]
push dword [edi + 0x2c]
push dword [ebp - 0xac]
call fcn.004aa820
add esp, 0x28
test ax, ax
jne 0x4aa3e6
pop edi
pop esi
mov eax, 6
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push 0
push ebx
mov ebx, dword [ebp - 0xac]
push dword [ebx]
call fcn.00595cb4
movsx eax, word [ebp - 0x9a]
push esi
push eax
push dword [edi + 0x30]
push dword [edi + 0x2c]
push ebx
call fcn.004aa8b0
add esp, 0x20
test ax, ax
je 0x4aa3d0
lea eax, [ebp - 0xa8]
push eax
push edi
call fcn.00457000
movzx eax, ax
add esp, 8
mov dword [ebp - 0xc8], eax
test ax, ax
jne 0x4aa6e1
mov eax, 0x7f0
cmp word [edi + 0x24], ax
je 0x4aa4bf
mov cl, byte [ebp - 0x9a]
mov eax, 1
shl eax, cl
xor ebx, ebx
test eax, eax
jle 0x4aa4bf
mov edi, dword [ebp - 0xac]
xor esi, esi
nop
mov eax, dword [ebp - 0x88]
push dword [edi]
movzx eax, byte [esi + eax + 2]
push eax
call fcn.005958b3
mov eax, dword [ebp - 0x88]
push dword [edi]
movzx eax, byte [esi + eax + 1]
push eax
call fcn.005958b3
mov eax, dword [ebp - 0x88]
push dword [edi]
movzx eax, byte [esi + eax]
push eax
call fcn.005958b3
push dword [edi]
push 0
call fcn.005958b3
mov cl, byte [ebp - 0x9a]
lea esi, [esi + 3]
mov eax, 1
inc ebx
shl eax, cl
add esp, 0x20
cmp ebx, eax
jl 0x4aa460
mov edi, dword [ebp - 0xbc]
cmp word [edi + 0x3a], 0
mov dword [ebp - 0xb8], 0
jl 0x4aa50a
cmp word [ebp - 0x9a], 8
jg 0x4aa50a
mov esi, dword [edi + 0x30]
mov eax, esi
imul eax, dword [ebp - 0x90]
push eax
call fcn.00593e38
imul esi, dword [ebp - 0xb0]
mov dword [ebp - 0xb8], eax
push esi
call fcn.00593e38
add esp, 8
mov dword [ebp - 0xcc], eax
jmp 0x4aa50c
xor eax, eax
xor ebx, ebx
mov dword [ebp - 0xc0], ebx
cmp dword [edi + 0x30], ebx
jle 0x4aa66a
mov dword [ebp - 0xc4], eax
xor esi, esi
push 1
push ebx
push edi
call fcn.00459620
add esp, 0xc
cmp dword [ebp - 0xb8], 0
je 0x4aa612
mov eax, dword [ebp - 0x90]
mov ecx, ebx
mov edx, dword [ebp - 0xc4]
imul ecx, eax
push eax
push dword [ebp - 0xa0]
mov dword [ebp - 0xbc], edx
add ecx, dword [ebp - 0xb8]
push ecx
mov dword [ebp - 0xb4], ecx
call fcn.00592150
xor esi, esi
add esp, 0xc
xor bl, bl
xor bh, bh
cmp dword [edi + 0x2c], esi
jle 0x4aa5c5
lea esp, [esp]
movsx eax, word [ebp - 0x9a]
add bl, bl
push eax
push esi
push dword [ebp - 0xb4]
call fcn.004a9ff0
movzx eax, al
add esp, 0xc
cmp ax, word [edi + 0x3a]
jne 0x4aa5a5
or bl, 1
inc bh
cmp bh, 8
jne 0x4aa5bf
mov eax, dword [ebp - 0xbc]
xor bh, bh
mov byte [eax], bl
inc eax
mov dword [ebp - 0xbc], eax
xor bl, bl
inc esi
cmp esi, dword [edi + 0x2c]
jl 0x4aa580
xor esi, esi
cmp dword [edi + 0x2c], esi
jle 0x4aa606
lea esp, [esp]
movsx ebx, word [ebp - 0x9a]
push ebx
push esi
push dword [ebp - 0xb4]
call fcn.004a9ff0
movzx eax, al
add esp, 0xc
cmp ax, word [edi + 0x3a]
jne 0x4aa600
push ebx
push esi
push dword [ebp - 0xb4]
call fcn.004aa700
add esp, 0xc
inc esi
cmp esi, dword [edi + 0x2c]
jl 0x4aa5d0
mov ebx, dword [ebp - 0xc0]
mov esi, dword [ebp - 0xb4]
mov eax, dword [ebp - 0xac]
cmp dword [ebp - 0xb8], 0
push dword [eax]
mov eax, dword [ebp - 0xa0]
push 1
push dword [ebp - 0x90]
cmovne eax, esi
push eax
call fcn.0059628c
add esp, 0x10
cmp eax, 1
mov eax, dword [ebp - 0xb0]
jne 0x4aa65e
add dword [ebp - 0xc4], eax
inc ebx
mov dword [ebp - 0xc0], ebx
cmp ebx, dword [edi + 0x30]
jl 0x4aa525
jmp 0x4aa670
mov dword [ebp - 0xc8], 4
jmp 0x4aa670
mov eax, dword [ebp - 0xb0]
mov ebx, dword [ebp - 0xb8]
test ebx, ebx
je 0x4aa6a3
mov ecx, dword [ebp - 0xac]
mov esi, dword [ebp - 0xcc]
push dword [ecx]
push dword [edi + 0x30]
push eax
push esi
call fcn.0059628c
push ebx
call fcn.00592c4b
push esi
call fcn.00592c4b
add esp, 0x18
jmp 0x4aa6d2
mov eax, dword [edi + 0x30]
xor esi, esi
mov ebx, dword [ebp - 0xb0]
imul eax, ebx
test eax, eax
jle 0x4aa6d2
mov eax, dword [ebp - 0xac]
push dword [eax]
push 0
call fcn.005958b3
mov eax, dword [edi + 0x30]
inc esi
imul eax, ebx
add esp, 8
cmp esi, eax
jl 0x4aa6b5
push edi
call fcn.00454fa0
mov eax, dword [ebp - 0xc8]
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret