Function at 0x402430
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x14020]
mov eax, 0x14020
call fcn.0040d8a0
push 0xffffffffffffffff
push 0x4187a0
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x423688]
xor eax, ebp
mov dword [ebp + 0x1401c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x14028]
call fcn.00402160
test al, al
je 0x4026bb
lea eax, [ebp - 0x1c]
push eax
call fcn.00402330
push esi
push eax
lea ecx, [ebp - 0x18]
xor edi, edi
push ecx
mov dword [ebp - 4], edi
call fcn.00402020
add esp, 0x10
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4024bf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebp + 0x1402c]
lea ecx, [ebp + 0x14030]
push ecx
push edx
push 0xffffffffffffffff
lea eax, [ebp + 0x1c]
push 0xa000
push eax
call fcn.0040cfff
add esp, 0x14
lea ecx, [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edx, dword [0x4246c0]
mov eax, dword [edx + 0xc]
mov ecx, 0x4246c0
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
movzx ecx, word [ebp - 0x22]
movzx edx, word [ebp - 0x24]
movzx eax, word [ebp - 0x26]
push ecx
movzx ecx, word [ebp - 0x28]
push edx
movzx edx, word [ebp - 0x2a]
push eax
movzx eax, word [ebp - 0x2e]
push ecx
movzx ecx, word [ebp - 0x30]
push edx
push eax
push ecx
lea edx, [ebp - 0x14]
push 0x41a3b8
push edx
mov byte [ebp - 4], 3
call fcn.00402100
mov eax, dword [0x4246c0]
mov edx, dword [eax + 0xc]
add esp, 0x24
mov ecx, 0x4246c0
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x14]
lea eax, [ebp + 0x1c]
push eax
push ecx
lea edx, [ebp - 0x10]
push 0x41a3a0
push edx
mov byte [ebp - 4], 4
call fcn.00402100
mov eax, dword [ebp - 0x18]
add esp, 0x10
push edi
push 0x80
push 4
push edi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40264f
push 2
push edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
call dword [0x423638]
mov ebx, eax
mov eax, dword [ebp - 0x10]
cmp eax, edi
jne 0x4025ad
xor eax, eax
jmp 0x4025dc
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x4025c2
xor eax, eax
jmp 0x4025dc
lea edi, [eax + eax]
mov eax, edi
call fcn.0040d8d0
mov ecx, dword [ebp - 0x10]
mov eax, esp
push ebx
push edi
push ecx
push eax
call fcn.00401000
xor edi, edi
mov ecx, eax
mov dword [ebp + 0x18], 0xf
mov dword [ebp + 0x14], edi
mov byte [ebp + 4], 0
lea ebx, [ecx + 1]
nop
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x4025f0
sub ecx, ebx
push ecx
push eax
lea ecx, [ebp]
call fcn.004019e0
mov eax, dword [ebp + 4]
mov ebx, 0x10
cmp dword [ebp + 0x18], ebx
mov dword [ebp - 0x20], edi
jae 0x402618
lea eax, [ebp + 4]
mov ecx, dword [ebp + 0x14]
push edi
lea edx, [ebp - 0x20]
push edx
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x18], ebx
jb 0x402641
mov edx, dword [ebp + 4]
push edx
call fcn.0040cb3d
add esp, 4
mov dword [ebp + 0x18], 0xf
mov dword [ebp + 0x14], edi
mov byte [ebp + 4], 0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402672
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402695
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4026bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x40]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1401c]
xor ecx, ebp
call fcn.0040d809
add ebp, 0x14020
mov esp, ebp
pop ebp
ret