Function at 0x46a22a
Capabilities:
Write file on windows

Disassembly:
push 0x8c
mov eax, 0x545c99
call fcn.0053655e
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
cmp dword [esi + 0x14], 8
mov eax, esi
mov dword [ebp - 4], ebx
jb 0x46a251
mov eax, dword [esi]
push ebx
push ebx
push 0x80
push 3
push 1
push SysReAllocString
push eax
lea ecx, [ebp - 0x50]
call fcn.00405781
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x46a5a2
push 8
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x50]
call fcn.00468e5b
cmp dword [ebp - 0x88], 0x53534e53
je 0x46a2b3
cmp dword [ebp - 0x84], 1
je 0x46a2b3
mov esi, dword [ebp - 0x50]
test esi, esi
je 0x46a5ac
push esi
call edi
mov esi, ebx
jmp 0x46a5a5
lea eax, [ebp - 0x74]
xorps xmm0, xmm0
push eax
lea ecx, [ebp - 0x50]
movlpd qword [ebp - 0x74], xmm0
call fcn.0040c491
push 8
pop eax
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x41], bl
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x78], ebx
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
cmp dword [ebp - 0x70], ebx
jb 0x46a58a
ja 0x46a2f7
cmp dword [ebp - 0x74], eax
jbe 0x46a58a
push ebx
push ebx
push eax
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x48], ebx
call fcn.00468e96
push 2
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x50]
call fcn.00468e5b
test eax, eax
jne 0x46a48b
mov eax, dword [ebp - 0x48]
test ax, ax
je 0x46a48b
lea ecx, [ebp - 0x69]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x51]
mov byte [ebp - 0x51], bl
push ecx
push eax
lea ecx, [ebp - 0x68]
call fcn.00404e21
movzx eax, word [ebp - 0x48]
lea ecx, [ebp - 0x50]
push eax
push dword [ebp - 0x68]
mov byte [ebp - 4], 2
call fcn.00468e5b
test eax, eax
jne 0x46a47f
movzx eax, word [ebp - 0x48]
add eax, 2
add dword [ebp - 0x58], eax
lea eax, [ebp - 0x90]
push 5
push dword [ebp - 0x68]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp byte [ebp - 0x90], 6
jne 0x46a44e
mov eax, dword [ebp - 0x68]
add eax, 5
push 8
push eax
lea eax, [ebp - 0x98]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x68]
add eax, 0xd
mov dword [ebp - 0x5c], ebx
push 4
push eax
lea eax, [ebp - 0x5c]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 0x5c]
add esp, 0x18
test ecx, ecx
je 0x46a44e
movzx eax, word [ebp - 0x48]
cmp ecx, eax
jae 0x46a44e
push ebx
push ecx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], bl
call fcn.00406b8a
cmp dword [ebp - 0x14], 0x10
lea ecx, [ebp - 0x28]
push dword [ebp - 0x5c]
cmovae ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x68]
add eax, 0x11
mov byte [ebp - 4], 3
push eax
push ecx
call sub.VCRUNTIME140.dll_memcpy
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0041c94f
add esp, 0x14
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 4
push eax
call fcn.00403d03
mov ecx, eax
call fcn.004a8123
lea ecx, [ebp - 0x40]
test al, al
je 0x46a43d
mov byte [ebp - 0x41], 1
call fcn.0040257a
lea ecx, [ebp - 0x28]
call fcn.00402554
jmp 0x46a45a
call fcn.0040257a
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00402554
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x80]
call fcn.00468e32
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.004093da
mov eax, dword [ebp - 0x58]
cmp ebx, dword [ebp - 0x70]
jb 0x46a2f7
ja 0x46a48b
cmp eax, dword [ebp - 0x74]
jb 0x46a2f7
jmp 0x46a48b
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.004093da
cmp byte [ebp - 0x41], 0
je 0x46a58a
cmp dword [ebp - 0x50], 0
je 0x46a4a3
push dword [ebp - 0x50]
call edi
mov dword [ebp - 0x50], ebx
cmp dword [esi + 0x14], 8
jb 0x46a4ab
mov esi, dword [esi]
push ebx
push ebx
push 0x80
push 2
push 2
push 0x40000000
push esi
lea ecx, [ebp - 0x50]
call fcn.00405781
mov esi, dword [ebp - 0x50]
test eax, eax
jne 0x46a598
push ebx
lea eax, [ebp - 0x5c]
push eax
push 8
lea eax, [ebp - 0x88]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x46a4ef
call fcn.00405442
jmp 0x46a4f1
mov eax, ebx
test eax, eax
je 0x46a507
test esi, esi
je 0x46a598
push esi
call edi
mov esi, ebx
jmp 0x46a598
mov eax, dword [ebp - 0x80]
jmp 0x46a56d
push eax
lea ecx, [ebp - 0x68]
call fcn.0040927e
mov eax, dword [ebp - 0x64]
sub eax, dword [ebp - 0x68]
movzx eax, ax
push ebx
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x70]
push eax
push 2
lea eax, [ebp - 0x5c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x46a541
call fcn.00405442
mov dword [ebp - 0x58], eax
jmp 0x46a544
mov dword [ebp - 0x58], ebx
movzx eax, word [ebp - 0x5c]
lea ecx, [ebp - 0x50]
push ebx
push eax
push dword [ebp - 0x68]
call fcn.0040664d
cmp dword [ebp - 0x58], 0
jne 0x46a577
test eax, eax
jne 0x46a577
lea ecx, [ebp - 0x68]
call fcn.004093da
mov eax, dword [ebp - 0x48]
add eax, 0xc
mov dword [ebp - 0x48], eax
cmp eax, dword [ebp - 0x7c]
jne 0x46a50c
jmp 0x46a58d
test esi, esi
je 0x46a580
push esi
call edi
mov esi, ebx
lea ecx, [ebp - 0x68]
call fcn.004093da
jmp 0x46a598
mov esi, dword [ebp - 0x50]
test esi, esi
je 0x46a596
push esi
call edi
mov esi, ebx
mov bl, 1
lea ecx, [ebp - 0x80]
call fcn.0046a1d6
jmp 0x46a5a5
mov esi, dword [ebp - 0x50]
test esi, esi
je 0x46a5ac
push esi
call edi
mov al, bl
call fcn.00536508
ret 4