Function at 0x401d80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.0041ad50
mov eax, dword [0x427008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov eax, dword [esi + 0x108]
test eax, eax
je 0x401ff1
dec dword [esi + 0x104]
dec eax
push ebx
push edi
push 0
push 0x423f80
mov dword [esi + 0x108], eax
call fcn.00402f50
mov ebx, dword [esi + 0x108]
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp ebx, dword [esi + 0x104]
jge 0x401e86
lea edi, [esi + 4]
add edi, ebx
mov al, byte [edi + 1]
push 0
push 0
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
mov byte [edi], al
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, 0x800
ja 0x401e72
push eax
lea eax, [ebp - 0x804]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
lea eax, [ebp - 0x804]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, 0x800
ja 0x401e72
push 0
push 0
push eax
lea eax, [ebp - 0x1004]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x804]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 1
lea eax, [ebp - 0x1004]
push eax
push dword [esi + 0x2028]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc ebx
inc edi
cmp ebx, dword [esi + 0x104]
jl 0x401de0
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
push 0x423f84
push 0
push 0xfde9
call ebx
cmp eax, 0x800
ja 0x401f22
push eax
lea eax, [ebp - 0x804]
push eax
push 0xffffffffffffffff
push 0x423f84
push 0
push 0xfde9
call ebx
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
lea eax, [ebp - 0x804]
push eax
push 0
push 1
call edi
cmp eax, 0x800
ja 0x401f22
push 0
push 0
push eax
lea eax, [ebp - 0x1004]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x804]
push eax
push 0
push 1
call edi
lea ecx, [ebp - 0x1004]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401f01
push 0
push 0
sub ecx, edx
lea eax, [ebp - 0x1004]
push ecx
push eax
push dword [esi + 0x2028]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [esi + 0x104]
cmp edi, dword [esi + 0x108]
jl 0x401fe3
push 0
push 0
push 0xffffffffffffffff
push 0x423f80
push 0
push 0xfde9
call ebx
cmp eax, 0x800
ja 0x401fd6
push eax
lea eax, [ebp - 0x1004]
push eax
push 0xffffffffffffffff
push 0x423f80
push 0
push 0xfde9
call ebx
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
lea eax, [ebp - 0x1004]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, 0x800
ja 0x401fd6
push 0
push 0
push eax
lea eax, [ebp - 0x804]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x1004]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [ebp - 0x804]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401fb5
push 0
push 0
sub ecx, edx
lea eax, [ebp - 0x804]
push ecx
push eax
push dword [esi + 0x2028]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec edi
cmp edi, dword [esi + 0x108]
jge 0x401f34
mov eax, dword [esi + 0x2010]
pop edi
mov dword [esi + 0x2014], eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040614e
mov esp, ebp
pop ebp
ret