Function at 0x403540
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47cc3d
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x4b4200]
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 eax, ecx
mov dword [ebp - 0x18], eax
mov ecx, dword [eax]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
cmp ecx, 0xffffffff
je 0x403761
test ecx, ecx
je 0x403761
cmp esi, 1
jge 0x4035b0
test ebx, ebx
je 0x403761
xor esi, esi
cmp word [ebx], si
je 0x4035a8
nop dword [eax]
inc esi
cmp word [ebx + esi*2], 0
jne 0x4035a0
test esi, esi
je 0x403761
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], 0
test al, 0x20
je 0x4035e0
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 0x403761
mov eax, dword [ebp - 0x14]
jmp 0x403763
test al, 0x40
je 0x403694
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x20], 1
mov ecx, 2
mov dword [ebp - 4], 0
lea eax, [esi + 1]
mov dword [ebp - 0x24], 0
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov edi, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x1c], edi
mov word [edi + esi*2], ax
mov word [edi], ax
test esi, esi
jle 0x403667
mov edx, edi
sub ebx, edi
mov edi, esi
movzx ecx, byte [edx + ebx + 1]
lea edx, [edx + 2]
mov word [edx - 2], cx
movzx eax, word [edx + ebx - 2]
shl ax, 8
or ax, cx
mov word [edx - 2], ax
sub edi, 1
jne 0x403643
mov edi, dword [ebp - 0x1c]
push 0
lea eax, [ebp - 0x14]
push eax
lea eax, [esi + esi]
push eax
mov eax, dword [ebp - 0x18]
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.00469dd3
add esp, 4
mov eax, esi
jmp 0x403763
test eax, 0x188
je 0x40371d
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 0x403761
push eax
call fcn.0046a3df
add esp, 4
mov edi, eax
push 0
push 0
push dword [ebp - 0x1c]
push edi
push esi
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x40370e
push 0
lea ecx, [ebp - 0x14]
push ecx
push eax
mov eax, dword [ebp - 0x18]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40370e
mov esi, dword [ebp - 0x14]
push edi
call fcn.00469dd3
add esp, 4
mov eax, esi
jmp 0x403763
push edi
xor esi, esi
call fcn.00469dd3
add esp, 4
mov eax, esi
jmp 0x403763
push esi
call fcn.0046a3df
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 - 0x18]
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.00469dd3
add esp, 4
mov eax, esi
jmp 0x403763
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.00469dc5
mov esp, ebp
pop ebp
ret 8