Function at 0x404df5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
cmp edi, ebx
je 0x40563d
jmp 0x404e13
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x404f12
mov eax, dword [edi + 8]
mov dword [ebp - 8], 1
cmp eax, ebx
je 0x404e43
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov dword [ebp - 8], eax
jmp 0x404e49
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
inc dword [ebp - 8]
push dword [ebp - 8]
call fcn.00415a3c
cmp eax, ebx
pop ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], eax
je 0x40560b
inc dword [ebp - 4]
mov byte [eax], 4
mov eax, dword [edi + 8]
cmp eax, ebx
je 0x404ea1
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
push dword [ebp - 4]
push 0xffffffffffffffff
push dword [edi + 8]
push ebx
push ebx
call esi
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [edi + 8]
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax - 1]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [eax], bl
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 8]
push dword [ebp - 0x10]
push dword [ebp + 8]
call esi
test eax, eax
je 0x40561e
lea eax, [ebp - 0x10]
push eax
call fcn.00415a56
push dword [ebp + 0x10]
push dword [edi + 0x5c]
push dword [ebp + 8]
call fcn.00404df5
add esp, 0x10
test eax, eax
je 0x405639
lea eax, [ebp - 0x1c]
push ebx
push eax
push 1
push 0x42a2e4
push dword [ebp + 8]
call esi
test eax, eax
je 0x40560b
mov edi, dword [edi + 0x60]
cmp edi, ebx
mov dword [ebp + 0xc], edi
jne 0x404e10
jmp 0x40563d
cmp eax, 1
jne 0x404eff
cmp dword [edi + 0x5c], ebx
je 0x404eff
mov dword [ebp - 8], eax
mov eax, dword [edi + 8]
cmp eax, ebx
je 0x404f3c
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov dword [ebp - 8], eax
jmp 0x404f42
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [edi + 0x28]
add dword [ebp - 8], 0x12
cmp eax, ebx
je 0x404f62
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax - 1]
mov dword [ebp - 8], eax
mov eax, dword [edi + 0x2c]
inc dword [ebp - 8]
cmp eax, ebx
je 0x404f81
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax - 1]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x61c]
push 0xa
push eax
push dword [edi + 0x30]
call fcn.00423065
add esp, 0xc
lea eax, [ebp - 0x61c]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 8]
push 0xa
lea eax, [ecx + eax + 1]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x21c]
push eax
push dword [edi + 0x68]
call fcn.00423065
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp + eax*2 - 0x21c]
push 0xa
mov word [eax], 0x2c
inc eax
inc eax
push eax
mov dword [ebp - 4], eax
push dword [edi + 0x6c]
call fcn.00423065
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 4]
push 0xa
lea eax, [ecx + eax*2]
mov word [eax], 0x2c
add eax, 2
push eax
push dword [edi + 0x70]
call fcn.00423065
add esp, 0xc
lea eax, [ebp - 0x21c]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax + 1]
push eax
mov dword [ebp - 8], eax
call fcn.00415a3c
cmp eax, ebx
pop ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], eax
je 0x40560b
inc dword [ebp - 4]
mov byte [eax], 1
mov eax, dword [edi + 8]
cmp eax, ebx
je 0x405083
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
push dword [ebp - 4]
push 0xffffffffffffffff
push dword [edi + 8]
push ebx
push ebx
call esi
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [edi + 8]
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax - 1]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
inc dword [ebp - 4]
push 0x10
mov byte [eax], bl
lea eax, [ebp - 0x41c]
push eax
push dword [edi + 0x24]
call fcn.00423065
add esp, 0xc
lea eax, [ebp - 0x41c]
mov dword [ebp - 0xc], ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 8
pop ecx
sub ecx, eax
test ecx, ecx
jle 0x4050db
mov eax, dword [ebp - 4]
inc dword [ebp - 4]
inc dword [ebp - 0xc]
mov byte [eax], 0x30
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 8
pop ecx
sub ecx, eax
cmp dword [ebp - 0xc], ecx
jl 0x4050b8
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x41c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
lea eax, [ebp - 0x41c]
push dword [ebp - 4]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add dword [ebp - 4], eax
lea eax, [ebp - 0x41c]
push 0x10
push eax
push dword [edi + 0x20]
call fcn.00423065
add esp, 0xc
lea eax, [ebp - 0x41c]
mov dword [ebp - 0xc], ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 8
pop ecx
sub ecx, eax
test ecx, ecx
jle 0x40515f
mov eax, dword [ebp - 4]
inc dword [ebp - 4]
inc dword [ebp - 0xc]
mov byte [eax], 0x30
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 8
pop ecx
sub ecx, eax
cmp dword [ebp - 0xc], ecx
jl 0x40513c
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x41c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
lea eax, [ebp - 0x41c]
push dword [ebp - 4]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
inc dword [ebp - 4]
mov byte [eax], bl
mov eax, dword [edi + 0x28]
cmp eax, ebx
je 0x4051d3
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
push dword [ebp - 4]
push 0xffffffffffffffff
push dword [edi + 0x28]
push ebx
push ebx
call esi
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [edi + 0x28]
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax - 1]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
inc dword [ebp - 4]
mov byte [eax], bl
mov eax, dword [edi + 0x2c]
cmp eax, ebx
je 0x405213
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
push dword [ebp - 4]
push 0xffffffffffffffff
push dword [edi + 0x2c]
push ebx
push ebx
call esi
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [edi + 0x2c]
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax - 1]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
push ebx
push ebx
inc dword [ebp - 4]
push ebx
push ebx
mov byte [eax], bl
push ebx
push ebx
lea eax, [ebp - 0x61c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
lea eax, [ebp - 0x61c]
push dword [ebp - 4]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x61c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
push ebx
push ebx
push ebx
lea eax, [ecx + eax - 1]
push ebx
push ebx
push ebx
mov byte [eax], bl
inc eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x21c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
lea eax, [ebp - 0x21c]
push dword [ebp - 4]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x21c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
push ebx
lea eax, [ecx + eax - 1]
mov byte [eax], bl
mov byte [eax + 1], 2
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 8]
push dword [ebp - 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40561e
lea eax, [ebp - 0x10]
push eax
call fcn.00415a56
mov eax, dword [edi + 0x5c]
pop ecx
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x404eff
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc]
call fcn.0040e0cb
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp - 0x18], eax
jne 0x4052fd
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc]
call fcn.00403873
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp - 0x18], eax
je 0x405330
lea eax, [ebp - 0x81c]
push 0xa
push eax
push dword [ebp - 0x14]
call fcn.00423065
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x81c]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
add eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
jmp 0x40534d
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov word [ebp - 0x81c], 0x30
mov word [ebp - 0x81a], bx
mov dword [ebp - 8], 2
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
cmp eax, ebx
je 0x40536c
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax - 1]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
inc dword [ebp - 8]
mov eax, dword [eax + 0x2c]
cmp eax, ebx
je 0x40538e
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax - 1]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x61c]
push 0xa
push eax
mov eax, dword [ebp - 0xc]
push dword [eax + 0x30]
call fcn.00423065
add esp, 0xc
lea eax, [ebp - 0x61c]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 8]
push 0xa
lea eax, [ecx + eax + 1]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x21c]
push eax
mov eax, dword [ebp - 0xc]
push dword [eax + 0x68]
call fcn.00423065
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp + eax*2 - 0x21c]
push 0xa
mov word [eax], 0x2c
inc eax
inc eax
mov dword [ebp - 4], eax
push eax
mov eax, dword [ebp - 0xc]
push dword [eax + 0x6c]
call fcn.00423065
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 4]
push 0xa
lea eax, [ecx + eax*2]
mov word [eax], 0x2c
add eax, 2
push eax
mov eax, dword [ebp - 0xc]
push dword [eax + 0x70]
call fcn.00423065
add esp, 0xc
lea eax, [ebp - 0x21c]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax + 1]
push eax
mov dword [ebp - 8], eax
call fcn.00415a3c
cmp eax, ebx
pop ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], eax
je 0x40560b
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x81c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
lea eax, [ebp - 0x81c]
push dword [ebp - 4]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x81c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax - 1]
mov byte [eax], bl
inc eax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
cmp eax, ebx
je 0x4054e1
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
mov eax, dword [ebp - 0xc]
push dword [ebp - 4]
push 0xffffffffffffffff
push dword [eax + 0xc]
push ebx
push ebx
call esi
mov eax, dword [ebp - 0xc]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [eax + 0xc]
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax - 1]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
inc dword [ebp - 4]
mov byte [eax], bl
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x2c]
cmp eax, ebx
je 0x40552a
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
mov eax, dword [ebp - 0xc]
push dword [ebp - 4]
push 0xffffffffffffffff
push dword [eax + 0x2c]
push ebx
push ebx
call esi
mov eax, dword [ebp - 0xc]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [eax + 0x2c]
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax - 1]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
push ebx
push ebx
inc dword [ebp - 4]
push ebx
push ebx
mov byte [eax], bl
push ebx
push ebx
lea eax, [ebp - 0x61c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
lea eax, [ebp - 0x61c]
push dword [ebp - 4]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x61c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
push ebx
push ebx
push ebx
lea eax, [ecx + eax - 1]
push ebx
push ebx
push ebx
mov byte [eax], bl
inc eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x21c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push eax
lea eax, [ebp - 0x21c]
push dword [ebp - 4]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x21c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax - 1]
mov byte [eax], bl
inc eax
mov byte [eax], 3
mov esi, dword [ebp - 0x18]
cmp esi, ebx
je 0x4055de
mov ecx, dword [ebp - 0x14]
lea edi, [eax + 1]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x18]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00415a56
mov edi, dword [ebp + 0xc]
pop ecx
lea eax, [ebp - 0x1c]
push ebx
push eax
push dword [ebp - 8]
push dword [ebp - 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40561e
lea eax, [ebp - 0x10]
push eax
call fcn.00415a56
mov eax, dword [ebp - 0xc]
pop ecx
mov eax, dword [eax + 0x60]
jmp 0x4052c8
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004175e2
pop ecx
pop ecx
jmp 0x405639
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004175e2
lea eax, [ebp - 0x10]
push eax
call fcn.00415a56
add esp, 0xc
xor eax, eax
jmp 0x405640
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret