Function at 0x4313e0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x43ce92
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x160
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
mov esi, 2
push 0x80
push esi
push ebx
push ebx
push 0x40000000
mov ebp, ecx
push 0x445928
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x1c], edi
je 0x43178b
mov eax, dword [ebp + 0x50]
mov ecx, dword [ebp + 0x54]
mov edx, dword [ebp + 0x58]
mov dword [esp + 0x44], eax
mov eax, dword [ebp + 0x5c]
mov dword [esp + 0x48], ecx
mov ecx, dword [ebp + 0x60]
mov dword [esp + 0x58], eax
mov eax, dword [ebp + 0x68]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x64], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x40], esi
mov dword [esp + 0x54], edx
mov edx, dword [ebp + 0x64]
mov dword [esp + 0x5c], ecx
mov ecx, dword [ebp + 0x6c]
mov esi, 0x34
cmp eax, ebx
mov dword [esp + 0x38], 0x4c574141
mov dword [esp + 0x4c], esi
mov dword [esp + 0x60], edx
mov dword [esp + 0x68], ecx
jne 0x431492
mov dword [esp + 0x50], ebx
jmp 0x4314ab
mov ecx, dword [ebp + 0xc]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [esp + 0x50], edx
lea ecx, [esp + 0x10]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push ecx
lea edx, [esp + 0x40]
push esi
push edx
push edi
call ebx
test eax, eax
je 0x431784
cmp dword [esp + 0x10], esi
jne 0x431784
xor esi, esi
lea eax, [esp + 0x10]
push esi
push eax
lea ecx, [esp + 0x58]
push 4
push ecx
push edi
call ebx
test eax, eax
je 0x4317e7
mov eax, dword [esp + 0x50]
xor edi, edi
cmp eax, esi
jbe 0x431524
mov eax, dword [ebp + 8]
lea edx, [esp + 0x10]
push 0
add eax, esi
push edx
push 0xc
push eax
mov eax, dword [esp + 0x2c]
push eax
call ebx
test eax, eax
je 0x43151e
mov eax, dword [esp + 0x50]
inc edi
add esi, 0xc
cmp edi, eax
jb 0x4314f6
jmp 0x431524
cmp edi, dword [esp + 0x50]
jb 0x43152c
mov dword [esp + 0x20], 1
mov ecx, dword [0x444020]
mov dword [esp + 0x14], ecx
mov edi, dword [ebp + 0x24]
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 0x178], ebx
mov dword [esp + 0x18], ebx
jbe 0x4316d5
mov ecx, dword [ebp + 0x14]
lea esi, [ebx*4]
mov edx, esi
push 0xd
add edx, ecx
lea eax, [esp + 0x30]
push edx
push eax
call fcn.004323c0
mov edx, dword [ebp + 0x20]
mov ecx, esi
add ecx, edx
lea edx, [esp + 0x28]
push ecx
push eax
push edx
mov byte [esp + 0x184], 1
call fcn.0041aa30
push 0xd
push eax
lea eax, [esp + 0x38]
mov byte [esp + 0x180], 2
push eax
call fcn.004323c0
mov ecx, dword [ebp + 0x2c]
mov byte [esp + 0x178], 3
add esi, ecx
lea ecx, [esp + 0x34]
push esi
push eax
push ecx
call fcn.0041aa30
push 0xa
lea edx, [esp + 0x28]
push eax
push edx
mov byte [esp + 0x184], 4
call fcn.004323c0
mov eax, dword [eax]
lea ecx, [esp + 0x14]
push eax
mov byte [esp + 0x17c], 5
mov eax, dword [eax - 8]
push eax
call fcn.004279e0
mov eax, dword [esp + 0x24]
mov edx, dword [0x444024]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x431612
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x431618
mov edx, dword [esp + 0x24]
lea eax, [edx - 0xc]
push eax
call fcn.0043a372
add esp, 4
jmp 0x431618
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [esp + 0x34]
mov edx, dword [0x444024]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x431643
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x431643
mov edx, dword [esp + 0x34]
lea eax, [edx - 0xc]
push eax
call fcn.0043a372
add esp, 4
mov eax, dword [esp + 0x30]
mov edx, dword [0x444024]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x43166e
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x43166e
mov edx, dword [esp + 0x30]
lea eax, [edx - 0xc]
push eax
call fcn.0043a372
add esp, 4
mov eax, dword [esp + 0x28]
mov edx, dword [0x444024]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x431699
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x431699
mov edx, dword [esp + 0x28]
lea eax, [edx - 0xc]
push eax
call fcn.0043a372
add esp, 4
mov eax, dword [esp + 0x2c]
mov edx, dword [0x444024]
mov byte [esp + 0x178], 0
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4316cc
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4316cc
mov edx, dword [esp + 0x2c]
add edx, 0xfffffff4
push edx
call fcn.0043a372
add esp, 4
inc ebx
cmp ebx, edi
jb 0x43154e
mov eax, dword [esp + 0x14]
mov eax, dword [eax - 8]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x431751
mov esi, dword [esp + 0x14]
mov edi, ebx
mov ecx, dword [esi - 8]
mov dword [esp + 0x18], ecx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
push eax
push 0xc52da29e
push ebx
call fcn.00420590
mov edi, dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x18]
push 0
push ecx
push 4
push edx
push edi
call esi
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push 0
push eax
push ecx
push ebx
push edi
call esi
push ebx
mov dword [esp + 0x24], eax
call fcn.0043a372
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [0x444024]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x431780
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x431780
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
push eax
call fcn.0043a372
add esp, 4
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x445924]
push str.attinfo.ini
lea edx, [esp + 0x70]
push ecx
push edx
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
mov eax, dword [ebp + 0x54]
pop edi
pop esi
pop ebp
cmp eax, 1
pop ebx
mov eax, 0x4450dc
je 0x4317b8
mov eax, 0x4450d8
lea ecx, [esp + 0x5c]
push ecx
push eax
push str.start
push str.attract
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov ecx, dword [esp + 0x160]
mov eax, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x16c
ret
mov dword [esp + 0x20], esi
jmp 0x431784