Function at 0x40a284
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov esi, 0x580e6d54
mov eax, esi
xor eax, esi
mov esi, eax
call sub.CRTDLL.DLL_rand
mov edx, 0xc003000d
push ecx
mov ecx, eax
imul edx
add edx, ecx
sar edx, 0xd
sar ecx, 0x1f
sub edx, ecx
mov eax, edx
pop ecx
mov edx, eax
mov byte [ebp - 0x11], dl
cmp dword [0x42f780], 0
jne 0x40a2c9
xor eax, eax
jmp 0x40a51a
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 8]
call fcn.00404ddd
add esp, 8
mov ebx, eax
or eax, eax
je 0x40a51a
movzx edi, byte [ebp - 0x11]
shl edi, 2
mov edx, dword [edi + 0x42f768]
sub edx, dword [edi + 0x42f764]
mov edi, edx
dec edi
mov dword [ebp - 0x18], edi
mov eax, esi
mul esi
mov dword [ebp - 0x24], eax
mov esi, eax
push edi
movzx edi, byte [ebp - 0x11]
shl edi, 2
push dword [edi + 0x42f764]
mov edi, ebx
add edi, dword [0x42f780]
push edi
call sub.CRTDLL.DLL_memcpy
mov eax, esi
xor eax, esi
mov esi, eax
push 0xc
push 0
mov eax, ebx
add eax, dword [0x42f780]
add eax, dword [ebp - 0x18]
push eax
call sub.CRTDLL.DLL_memset
add esp, 0x18
mov eax, dword [0x42f784]
mov dword [ebp - 4], eax
jmp 0x40a362
add esi, 0x16d6
mov eax, ebx
add eax, dword [ebp - 4]
mov edx, dword [0x42f78c]
xor dword [eax], edx
add dword [ebp - 4], 4
mov eax, dword [0x42f784]
add eax, dword [0x42f788]
cmp dword [ebp - 4], eax
jb 0x40a34b
mov eax, dword [0x42f790]
mov dword [ebp - 8], eax
jmp 0x40a393
mov eax, ebx
add eax, dword [ebp - 8]
mov edx, dword [0x42f798]
xor dword [eax], edx
xor esi, 0x6fd1
add dword [ebp - 8], 4
mov eax, dword [0x42f790]
add eax, dword [0x42f794]
cmp dword [ebp - 8], eax
jb 0x40a37c
call sub.CRTDLL.DLL_rand
mov dword [ebp - 0x28], eax
call sub.CRTDLL.DLL_rand
mov edi, dword [ebp - 0x28]
movzx edi, di
mov edx, eax
movzx edx, dx
shl edx, 0x10
or edi, edx
mov dword [0x42f78c], edi
add esi, 0x6eee
call sub.CRTDLL.DLL_rand
mov dword [ebp - 0x2c], eax
call sub.CRTDLL.DLL_rand
mov edi, dword [ebp - 0x2c]
movzx edi, di
mov edx, eax
movzx edx, dx
shl edx, 0x10
or edi, edx
mov dword [0x42f798], edi
push 0x40
push 0x42f774
mov eax, ebx
add eax, dword [0x42f77c]
push eax
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
mov eax, dword [0x42f784]
mov dword [ebp - 0xc], eax
jmp 0x40a428
mov eax, esi
add eax, esi
mov esi, eax
mov eax, ebx
add eax, dword [ebp - 0xc]
mov edx, dword [0x42f78c]
xor dword [eax], edx
add dword [ebp - 0xc], 4
mov eax, dword [0x42f784]
add eax, dword [0x42f788]
cmp dword [ebp - 0xc], eax
jb 0x40a411
mov eax, dword [0x42f790]
mov dword [ebp - 0x10], eax
jmp 0x40a459
mov eax, esi
xor eax, esi
mov esi, eax
mov eax, ebx
add eax, dword [ebp - 0x10]
mov edx, dword [0x42f798]
xor dword [eax], edx
add dword [ebp - 0x10], 4
mov eax, dword [0x42f790]
add eax, dword [0x42f794]
cmp dword [ebp - 0x10], eax
jb 0x40a442
mov edi, ebx
add edi, dword [0x42f780]
movzx edx, byte [ebp - 0x11]
shl edx, 1
mov edx, dword [edx*4 + 0x42f79c]
mov ecx, dword [0x42f78c]
mov dword [edx + edi], ecx
mov eax, esi
xor eax, esi
mov esi, eax
mov edi, ebx
add edi, dword [0x42f780]
movzx edx, byte [ebp - 0x11]
shl edx, 1
mov edx, dword [edx*4 + str._nz_]
mov ecx, dword [0x42f798]
mov dword [edx + edi], ecx
cmp byte [ebp - 0x11], 1
jne 0x40a4b5
sub dword [ebp - 0x18], 0x18
movzx eax, word [ebp - 0x18]
push eax
mov eax, ebx
add eax, dword [0x42f780]
push eax
call fcn.0040a15c
add esp, 8
mov eax, esi
sub eax, esi
mov esi, eax
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push dword [ebp + 8]
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x1c], eax
xor esi, 0x4535
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x20]
push ebx
push dword [ebp - 0x1c]
call sub.KERNEL32.DLL_WriteFile
push dword [ebp - 0x1c]
call sub.KERNEL32.DLL_CloseHandle
push ebx
call sub.KERNEL32.DLL_LocalFree
sub esi, 0x53c5
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret