Function at 0x4a6a60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0xa8]
push esi
mov esi, dword [ebp + 8]
push edi
push eax
mov dword [ebp - 0xb0], esi
call fcn.00458dd0
mov eax, dword [0x5dba80]
movdqu xmm0, xmmword [str.Wavefront_Raster_Image]
mov edi, dword [ebx + 0x2c]
mov dword [ebp - 0x74], eax
mov ax, word [0x5dba84]
mov word [ebp - 0x70], ax
mov al, byte [0x5dba86]
mov byte [ebp - 0x6e], al
mov eax, 0x10
mov word [ebp - 0xa4], ax
mov eax, 8
mov word [ebp - 0x9a], ax
xor eax, eax
cmp word [ebx + 0x28], 0x20
push 4
push dword [ebx + 0x30]
sete al
mov dword [ebp - 0x90], edi
add eax, 3
movdqu xmmword [ebp - 0x84], xmm0
mov word [ebp - 0x9c], ax
call fcn.00592c0b
add esp, 0xc
mov dword [ebp - 0xac], eax
test eax, eax
je 0x4a6b2c
lea eax, [edi + edi]
push 1
push eax
call fcn.00592c0b
mov edi, eax
add esp, 8
mov dword [ebp - 0xb8], edi
test edi, edi
jne 0x4a6b42
push dword [ebp - 0xac]
call fcn.00592c4b
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push ebx
push esi
call fcn.004a6d10
add esp, 8
test ax, ax
jne 0x4a6b7b
push dword [ebp - 0xac]
call fcn.00592c4b
push edi
call fcn.00592c4b
add esp, 8
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xa8]
push eax
push ebx
call fcn.00457000
movzx eax, ax
add esp, 8
mov dword [ebp - 0xb4], eax
test ax, ax
je 0x4a6bb2
push dword [ebp - 0xac]
call fcn.00592c4b
push edi
call fcn.00592c4b
add esp, 8
jmp 0x4a6cf7
push dword [esi]
call fcn.005960c7
xor edi, edi
mov dword [ebp - 0xc0], eax
add esp, 4
cmp dword [ebx + 0x30], edi
jle 0x4a6be1
lea esp, [esp]
push esi
push 0
call fcn.0045d510
inc edi
add esp, 8
cmp edi, dword [ebx + 0x30]
jl 0x4a6bd0
xor edi, edi
mov dword [ebp - 0xbc], edi
cmp dword [ebx + 0x30], edi
jle 0x4a6ca3
push 1
push edi
push ebx
call fcn.00459620
push dword [esi]
call fcn.005960c7
mov ecx, dword [ebp - 0xac]
add esp, 0x10
xor esi, esi
mov dword [ecx + edi*4], eax
xor eax, eax
cmp ax, word [ebp - 0x9c]
jge 0x4a6c7c
jmp 0x4a6c20
push dword [ebx + 0x2c]
mov eax, esi
imul eax, dword [ebp - 0x90]
add eax, dword [ebp - 0xa0]
push eax
push dword [ebp - 0xb8]
call fcn.004a6940
push dword [ebp - 0xb0]
mov edi, eax
push edi
call fcn.0045d590
mov eax, dword [ebp - 0xb0]
push dword [eax]
push 1
push edi
push dword [ebp - 0xb8]
call fcn.0059628c
add esp, 0x24
cmp eax, 1
jne 0x4a6c93
movsx eax, word [ebp - 0x9c]
inc esi
cmp esi, eax
jl 0x4a6c20
mov edi, dword [ebp - 0xbc]
mov esi, dword [ebp - 0xb0]
inc edi
mov dword [ebp - 0xbc], edi
cmp edi, dword [ebx + 0x30]
jge 0x4a6ca3
jmp 0x4a6bf2
mov esi, dword [ebp - 0xb0]
mov dword [ebp - 0xb4], 6
push 0
push dword [ebp - 0xc0]
push dword [esi]
call fcn.00595cb4
xor edi, edi
add esp, 0xc
cmp dword [ebx + 0x30], edi
jle 0x4a6cd8
lea esp, [esp]
mov eax, dword [ebp - 0xac]
push esi
push dword [eax + edi*4]
call fcn.0045d510
inc edi
add esp, 8
cmp edi, dword [ebx + 0x30]
jl 0x4a6cc0
push dword [ebp - 0xac]
call fcn.00592c4b
push dword [ebp - 0xb8]
call fcn.00592c4b
push ebx
call fcn.00454fa0
add esp, 0xc
mov ecx, dword [ebp - 4]
mov ax, word [ebp - 0xb4]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret