Function at 0x46e9db
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x494
and byte [ebp - 0xc], 0
and byte [ebp - 0xb], 0
and byte [ebp - 0xa], 0
and byte [ebp - 9], 0
and byte [ebp - 4], 0
or byte [ebp - 1], 0xff
and byte [ebp - 0x14], 0
or byte [ebp - 0xd], 0xff
push ebx
push esi
push edi
mov ebx, ecx
push 0x1b
xor eax, eax
pop ecx
lea edi, [ebp - 0x94]
rep stosd dword es:[edi], eax
mov eax, dword [ebx]
xor edx, edx
cmp eax, 0x14
mov byte [ebp - 3], 0x55
mov byte [ebp - 2], 0xaa
mov byte [ebp - 0x13], 0x24
mov byte [ebp - 0x12], 0x49
mov byte [ebp - 0x11], 0x6d
mov byte [ebp - 0x10], 0x92
mov byte [ebp - 0xf], 0xb6
mov byte [ebp - 0xe], 0xdb
mov dword [ebp - 8], edx
je 0x46eb98
cmp eax, 0x1b
je 0x46eb2b
cmp eax, 0x29
je 0x46eab5
cmp eax, 0x32
je 0x46ea63
mov eax, 0x80004005
jmp 0x46ecec
mov dword [ebp - 0x94], 0x28
mov dword [ebp - 0x84], edx
mov word [ebp - 0x86], 8
mov dword [ebp - 8], 0x400
xor ecx, ecx
mov eax, ecx
shl eax, 2
and byte [ebp + eax - 0x491], 0
mov byte [ebp + eax - 0x492], cl
mov byte [ebp + eax - 0x493], cl
mov byte [ebp + eax - 0x494], cl
inc ecx
cmp ecx, 0x100
jb 0x46ea85
jmp 0x46ebb1
mov eax, dword [ebx + 8]
mov ecx, eax
lea esi, [eax + 2]
lea eax, [ebp - 0x493]
xor edi, edi
mov dword [ebp - 0x94], 0x28
mov dword [ebp - 0x84], edx
mov word [ebp - 0x86], 8
mov dword [ebp - 8], 0x400
sub ecx, eax
mov eax, edi
shl eax, 2
lea edx, [ecx + eax]
mov dl, byte [ebp + edx - 0x493]
mov byte [ebp + eax - 0x492], dl
mov dl, byte [esi - 1]
mov byte [ebp + eax - 0x493], dl
mov dl, byte [esi]
and byte [ebp + eax - 0x491], 0
inc edi
add esi, 4
cmp edi, 0x100
mov byte [ebp + eax - 0x494], dl
jb 0x46eae7
xor edx, edx
jmp 0x46ebb1
mov dword [ebp - 0x94], 0x28
mov dword [ebp - 0x84], edx
mov word [ebp - 0x86], 8
mov dword [ebp - 8], 0x400
xor esi, esi
mov ecx, esi
shr ecx, 5
mov cl, byte [ebp + ecx - 0x14]
mov eax, esi
shl eax, 2
and byte [ebp + eax - 0x491], 0
mov byte [ebp + eax - 0x492], cl
mov ecx, esi
shr ecx, 2
and ecx, 7
mov cl, byte [ebp + ecx - 0x14]
mov byte [ebp + eax - 0x493], cl
mov ecx, esi
and ecx, 3
mov cl, byte [ebp + ecx - 4]
inc esi
cmp esi, 0x100
mov byte [ebp + eax - 0x494], cl
jb 0x46eb4d
jmp 0x46ebb1
mov dword [ebp - 0x94], 0x28
mov dword [ebp - 0x84], edx
mov word [ebp - 0x86], 0x18
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
mov esi, 0xb12
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x78], esi
movzx esi, word [ebp - 0x86]
shr esi, 3
mov dword [ebp - 0x90], ecx
imul ecx, esi
mov dword [ebp - 0x8c], eax
mov dword [ebp - 4], ecx
add ecx, 3
and ecx, 0xfffffffc
imul eax, ecx
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 8]
lea ecx, [eax + ecx + 0x36]
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x18], esi
lea esi, [ecx + 3]
stosw word es:[edi], ax
and esi, 0xfffffffc
sub esi, ecx
lea eax, [esi + ecx]
mov dword [ebp - 0x26], eax
mov eax, dword [ebp - 8]
add eax, 0x36
cmp dword [ebp + 0xc], edx
mov word [ebp - 0x88], 1
mov word [ebp - 0x28], 0x4d42
mov dword [ebp - 0x1e], eax
je 0x46ec3f
push edx
lea eax, [ebp + 0xc]
push eax
push 0xe
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor edx, edx
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push edx
lea eax, [ebp + 0xc]
push eax
push 0x28
lea eax, [ebp - 0x94]
push eax
push dword [ebp + 8]
call edi
cmp dword [ebp - 8], 0
je 0x46ec73
push 0
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x494]
push eax
push dword [ebp + 8]
call edi
mov ecx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x1c]
mov edx, dword [ebx + 0x18]
imul eax, ecx
imul edx, dword [ebp - 0x18]
mov edi, dword [ebx + 0x10]
add eax, edx
add eax, dword [ebx + 4]
dec edi
imul edi, ecx
add edi, eax
cmp edi, eax
mov dword [ebp - 0x18], eax
jb 0x46ecd2
push 0
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 4]
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 4], eax
jae 0x46ecca
sub eax, dword [ebp - 4]
push 0
lea ecx, [ebp + 0xc]
push ecx
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub edi, dword [ebx + 0x30]
cmp edi, dword [ebp - 0x18]
jae 0x46ec98
test esi, esi
je 0x46ecea
push 0
lea eax, [ebp + 0xc]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8