Function at 0x40a5e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47df5d
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x4b5200]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1c], edi
mov ecx, dword [edi]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
cmp ecx, 0xffffffff
je 0x40a80a
test ecx, ecx
je 0x40a80a
cmp esi, 1
jge 0x40a650
test ebx, ebx
je 0x40a80a
xor esi, esi
cmp word [ebx], si
je 0x40a648
nop dword [eax]
inc esi
cmp word [ebx + esi*2], 0
jne 0x40a640
test esi, esi
je 0x40a80a
mov eax, dword [edi + 4]
mov dword [ebp - 0x14], 0
test al, 0x20
je 0x40a680
push 0
lea eax, [ebp - 0x14]
push eax
lea eax, [esi + esi]
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a80a
mov eax, dword [ebp - 0x14]
jmp 0x40a80c
test al, 0x40
je 0x40a740
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x20], 1
xor ecx, ecx
mov dword [ebp - 4], 0
lea eax, [esi + 1]
mov dword [ebp - 0x24], 0
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
xor edx, edx
mov dword [ebp - 0x18], eax
lea ecx, [esi + esi]
add esp, 4
mov dword [ebp - 0x1c], ecx
mov word [ecx + eax], dx
mov word [eax], dx
test esi, esi
jle 0x40a717
mov edx, eax
sub ebx, eax
nop word [eax + eax]
movzx ecx, byte [edx + ebx + 1]
lea edx, [edx + 2]
mov word [edx - 2], cx
mov ax, word [edx + ebx - 2]
shl ax, 8
or ax, cx
mov word [edx - 2], ax
sub esi, 1
jne 0x40a6f0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
push 0
lea edx, [ebp - 0x14]
push edx
push ecx
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x18]
neg eax
sbb esi, esi
and esi, dword [ebp - 0x14]
call fcn.0046b303
add esp, 4
mov eax, esi
jmp 0x40a80c
test eax, 0x188
je 0x40a7c6
push 0
push 0
push 0
push 0
push esi
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x40a80a
push eax
call fcn.0046b90c
add esp, 4
mov dword [ebp - 0x18], eax
push 0
push 0
push dword [ebp - 0x1c]
push eax
push esi
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, dword [ebp - 0x18]
test eax, eax
je 0x40a7b7
push 0
lea ecx, [ebp - 0x14]
push ecx
push eax
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a7b7
mov edi, dword [ebp - 0x14]
push esi
call fcn.0046b303
add esp, 4
mov eax, edi
jmp 0x40a80c
push esi
xor edi, edi
call fcn.0046b303
add esp, 4
mov eax, edi
jmp 0x40a80c
push esi
call fcn.0046b90c
add esp, 4
mov edi, eax
push 0
push 0
push esi
push edi
push esi
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
lea ecx, [ebp - 0x14]
push ecx
push eax
mov eax, dword [ebp - 0x1c]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
push edi
sbb esi, esi
and esi, dword [ebp - 0x14]
call fcn.0046b303
add esp, 4
mov eax, esi
jmp 0x40a80c
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046b2f5
mov esp, ebp
pop ebp
ret 8