Function at 0x415122
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x444048
mov eax, dword fs:[0]
push eax
mov eax, 0x4114
call fcn.00437770
mov eax, dword [0x45a620]
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 - 0x40a0], eax
mov eax, dword [eax]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x40b0], ecx
test eax, eax
jne 0x415173
push 6
pop eax
jmp 0x4154df
mov dword [ebp - 0x64], eax
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x6c], 0x414fca
mov dword [ebp - 0x68], 0x414f2f
mov dword [ebp - 0x4090], 0x412df3
mov dword [ebp - 0x408c], 0x412e46
mov dword [ebp - 0x4088], 0x412e56
mov dword [ebp - 0x4084], 0x412ea0
mov dword [ebp - 0x4080], eax
mov dword [ebp - 0x58], 0x41055d
mov dword [ebp - 0x54], 0x410575
mov dword [ebp - 0x60], 0x41055d
mov dword [ebp - 0x5c], 0x410575
call fcn.004105c9
lea ecx, [ebp - 0x4120]
call fcn.0041112a
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x58]
push eax
lea edx, [ebp - 0x4090]
call fcn.004128c5
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x415212
lea edx, [ebp - 0x58]
lea ecx, [ebp - 0x4120]
call fcn.00411159
test ebx, ebx
jne 0x41516b
or dword [ebp - 0x40a8], 0xffffffff
xor edi, edi
mov esi, edi
mov dword [ebp - 0x409c], edi
mov dword [ebp - 0x40b4], edi
mov dword [ebp - 0x4098], esi
cmp dword [ebp - 0x4104], esi
jbe 0x4154c0
mov eax, dword [ebp - 0x4110]
add eax, 0x1c
mov dword [ebp - 0x4094], eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x40a4]
push eax
lea eax, [ebp - 0x40ac]
push eax
lea eax, [ebp - 0x40b4]
push eax
lea eax, [ebp - 0x409c]
push eax
lea eax, [ebp - 0x40a8]
push eax
push esi
lea edx, [ebp - 0x4090]
lea ecx, [ebp - 0x4120]
call fcn.00412b91
mov ebx, eax
add esp, 0x20
test ebx, ebx
jne 0x4154bd
mov eax, dword [ebp - 0x40e0]
mov ecx, dword [eax + esi*4 + 4]
sub ecx, dword [eax + esi*4]
cmp ecx, 1
jb 0x4154bd
xor eax, eax
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
push ecx
lea ecx, [ebp - 0x1c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.004155c4
mov edx, dword [ebp - 0x4098]
lea ecx, [ebp - 0x4120]
xor edi, edi
mov dword [ebp - 4], edi
mov esi, dword [ebp - 0x1c]
push esi
call fcn.004121f9
pop ecx
push dword [ebp - 0x40b0]
lea ecx, [ebp - 0x38]
call fcn.0040284c
mov byte [ebp - 4], 1
xor ecx, ecx
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
add eax, 0xfffffffe
mov word [ebp - 0x40cc], cx
push eax
push esi
lea ecx, [ebp - 0x40cc]
mov dword [ebp - 0x40b8], 7
mov dword [ebp - 0x40bc], edi
call fcn.004157cf
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x40cc]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x38]
call fcn.00402ddd
push edi
push 1
lea ecx, [ebp - 0x40cc]
mov byte [ebp - 4], 1
call fcn.00403476
mov eax, dword [ebp - 0x4094]
cmp byte [eax - 3], bl
lea eax, [ebp - 0x38]
push eax
je 0x41535e
mov ecx, dword [ebp - 0x40a0]
call fcn.004154fd
jmp 0x415436
lea ecx, [ebp - 0x50]
call fcn.0040284c
push 0x4525fc
mov byte [ebp - 4], 3
call fcn.0040126a
pop ecx
push eax
push ecx
push 0x4525fc
lea ecx, [ebp - 0x50]
call fcn.00403349
cmp eax, 0xffffffff
je 0x415392
push eax
lea ecx, [ebp - 0x50]
call fcn.00402912
mov ecx, dword [ebp - 0x40a0]
lea eax, [ebp - 0x50]
push eax
call fcn.004154fd
cmp dword [ebp - 0x24], 8
lea eax, [ebp - 0x38]
push edi
cmovae eax, dword [ebp - 0x38]
push 0x80
push 2
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x41548c
push 0
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x40a4]
mov eax, dword [ebp - 0x40ac]
add eax, dword [ebp - 0x409c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41547b
mov eax, dword [ebp - 0x40a4]
cmp dword [ebp - 0x20], eax
jne 0x41547b
mov eax, dword [ebp - 0x4094]
cmp byte [eax], 0
je 0x41541e
add eax, 0xffffffe4
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
je 0x41547b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x41548c
xor edi, edi
lea ecx, [ebp - 0x50]
push edi
push 1
call fcn.00403476
push edi
push 1
lea ecx, [ebp - 0x38]
call fcn.00403476
or dword [ebp - 4], 0xffffffff
test esi, esi
je 0x415459
push esi
call fcn.00427c2f
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edi
pop ecx
mov esi, dword [ebp - 0x4098]
add dword [ebp - 0x4094], 0x20
inc esi
mov dword [ebp - 0x4098], esi
cmp esi, dword [ebp - 0x4104]
jb 0x41524a
jmp 0x4154c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x415494
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push 0
push 1
lea ecx, [ebp - 0x50]
call fcn.00403476
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.00403476
or dword [ebp - 4], 0xffffffff
test esi, esi
je 0x4154c0
push esi
call fcn.00427c2f
pop ecx
jmp 0x4154c0
push 6
pop ebx
push dword [ebp - 0x409c]
lea eax, [ebp - 0x58]
push eax
call dword [ebp - 0x54]
pop ecx
pop ecx
lea edx, [ebp - 0x58]
lea ecx, [ebp - 0x4120]
call fcn.00411159
mov eax, ebx
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.004273bf
mov esp, ebp
pop ebp
ret 8