Function at 0x46cd20
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 8
push ebp
push esi
push edi
push 0x4b4518
push eax
mov ebp, ecx
call fcn.004656f1
mov esi, eax
xor edi, edi
add esp, 8
cmp esi, edi
jne 0x46cd4d
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 8
ret 4
push ebx
push esi
push 1
lea ecx, [esp + 0x24]
push 1
push ecx
mov byte [esp + 0x2c], 0
call fcn.0047897e
push esi
push 1
lea edx, [esp + 0x34]
push 1
push edx
mov byte [esp + 0x3c], 0
call fcn.0047897e
push esi
push 1
lea eax, [esp + 0x44]
push 1
push eax
mov byte [esp + 0x4c], 2
call fcn.0047897e
push esi
push 1
lea ecx, [esp + 0x54]
push 2
push ecx
mov dword [esp + 0x5c], edi
call fcn.0047897e
add esp, 0x40
push esi
push 1
lea edx, [esp + 0x24]
push 2
push edx
mov dword [esp + 0x2c], edi
call fcn.0047897e
push esi
push 1
lea eax, [esp + 0x34]
push 1
push eax
mov byte [esp + 0x3c], 0
call fcn.0047897e
push esi
push 1
lea ecx, [esp + 0x44]
push 2
push ecx
mov dword [esp + 0x4c], edi
call fcn.0047897e
push esi
push 1
lea edx, [esp + 0x54]
push 2
push edx
mov dword [esp + 0x5c], edi
call fcn.0047897e
movzx eax, word [ebp + 0xe]
add esp, 0x40
push esi
push 1
lea ecx, [esp + 0x24]
push 2
push ecx
mov dword [esp + 0x2c], eax
call fcn.0047897e
movzx edx, word [ebp + 0x10]
push esi
push 1
lea eax, [esp + 0x34]
push 2
push eax
mov dword [esp + 0x3c], edx
call fcn.0047897e
push esi
push 1
push 1
lea ecx, [esp + 0x48]
mov byte [esp + 0x48], 0x10
push ecx
call fcn.0047897e
push esi
push 1
lea edx, [esp + 0x54]
push 1
push edx
mov byte [esp + 0x5c], 0
call fcn.0047897e
add esp, 0x40
lea eax, [esp + 0x10]
push eax
mov ecx, ebp
call fcn.00467390
mov ebx, eax
movsx eax, word [ebp + 0x10]
lea ecx, [eax + eax - 2]
imul ecx, dword [esp + 0x10]
add ebx, ecx
cmp byte [0x4c02cc], 0
mov dword [esp + 0x14], edi
je 0x46cefd
cmp eax, edi
jle 0x46cf88
movsx eax, word [ebp + 0xe]
jmp 0x46ce87
xor edi, edi
test eax, eax
jle 0x46cede
jmp 0x46ce90
movzx eax, word [ebx + edi*2]
mov dword [esp + 0x1c], eax
shr word [esp + 0x1c], 5
and eax, 0x1f
lea edx, [eax*8]
mov eax, dword [esp + 0x1c]
sar edx, 3
and eax, 0x7fe
and edx, 0x1f
shl eax, 4
push esi
or edx, eax
movzx ecx, dx
push 1
lea edx, [esp + 0x24]
push 2
push edx
mov dword [esp + 0x2c], ecx
call fcn.0047897e
movsx eax, word [ebp + 0xe]
inc edi
add esp, 0x10
cmp edi, eax
jl 0x46ce90
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
neg edx
lea ebx, [ebx + edx*2]
movsx edx, word [ebp + 0x10]
inc ecx
cmp ecx, edx
mov dword [esp + 0x14], ecx
jl 0x46ce85
jmp 0x46cf88
cmp eax, edi
jle 0x46cf88
movsx eax, word [ebp + 0xe]
jmp 0x46cf12
xor edi, edi
test eax, eax
jle 0x46cf6e
jmp 0x46cf20
movzx eax, word [ebx + edi*2]
mov dword [esp + 0x1c], eax
shr word [esp + 0x1c], 5
mov ecx, dword [esp + 0x1c]
and eax, 0x1f
add eax, eax
add eax, eax
add eax, eax
sar eax, 3
and ecx, 0x3ff
and eax, 0x1f
shl ecx, 5
push esi
or eax, ecx
movzx edx, ax
push 1
lea eax, [esp + 0x24]
push 2
push eax
mov dword [esp + 0x2c], edx
call fcn.0047897e
movsx eax, word [ebp + 0xe]
inc edi
add esp, 0x10
cmp edi, eax
jl 0x46cf20
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
neg edx
lea ebx, [ebx + edx*2]
movsx edx, word [ebp + 0x10]
inc ecx
cmp ecx, edx
mov dword [esp + 0x14], ecx
jl 0x46cf10
mov ecx, ebp
call fcn.004673c0
push esi
call fcn.0047766d
add esp, 4
pop ebx
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 8
ret 4