Function at 0x4049a0
Capabilities:
Create thread
Encode data using xor

Disassembly:
sub esp, 0xc
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push ebx
mov ebx, dword [esp + 0x20]
add ecx, 0x3b3
push ebp
mov ebp, dword [esp + 0x18]
add ebx, 0x220
push esi
lea esi, [edx - 0x76]
mov dword [esp + 0x14], ebx
push edi
lea edi, [ebp - 0x2394]
mov dword [esp + 0x20], esi
xor edx, 0x38cd
mov dword [esp + 0x10], edi
lea eax, [esi + 0xaa]
mov dword [esp + 0x28], ecx
xor ebp, 0x7c0
mov dword [esp + 0x24], edx
cmp ecx, eax
jl 0x404ca4
cmp edx, esi
mov esi, dword [esp + 0x30]
je 0x404b54
mov ecx, dword [0x4b570c]
mov edi, dword [esi + 0x40]
cmp edi, dword [ecx + 0x7c]
je 0x404a27
mov eax, dword [0x507128]
add eax, 0xd62a8
or dword [esi + 0x64], eax
mov ecx, dword [0x4b570c]
mov eax, dword [esi + 0x108]
xor edx, 0x7b
xor eax, edi
add eax, 0x5966b
xor dword [0x50711c], eax
mov eax, dword [ecx + 0x40]
xor eax, dword [esi + 0x2c]
xor eax, 0x7f336
add dword [esi + 0x100], eax
mov ecx, dword [esi + 0x100]
mov eax, dword [esi + 0xc0]
xor eax, dword [0x5070a4]
sub ecx, eax
sub ecx, 0x166c
mov dword [esi + 0x100], ecx
mov ecx, dword [0x4b570c]
mov eax, dword [0x507110]
add eax, 0x7e351
xor dword [ecx + 0x100], eax
mov eax, dword [esi + 0x14]
add eax, 0x6b16f
xor dword [esi + 0x70], eax
mov eax, 0x5c959
sub eax, dword [esi + 0x3c]
add dword [esi + 0x100], eax
mov eax, dword [esp + 0x28]
xor eax, 0x728
sub eax, 0x9d9
push eax
push esi
lea eax, [ebp - 0x4c]
push eax
push edx
lea eax, [ebx - 0x296]
push eax
call fcn.004014e2
mov dword [0x507198], 0xbfa
add esp, 0x14
mov eax, dword [esi + 0xe8]
cmp eax, dword [esi + 0x28]
jbe 0x404ae0
add dword [esi + 0xf8], 0xfffff406
mov eax, dword [0x4b570c]
mov edx, dword [eax + 0x54]
cmp edx, dword [0x5070fc]
ja 0x404ca4
mov ecx, dword [esi + 0x58]
mov eax, dword [esi + 0x78]
sub eax, ecx
add eax, 0x5b406
xor dword [esi + 0x40], eax
mov ecx, dword [0x4b570c]
mov eax, dword [esi + 4]
add eax, dword [esi + 0x118]
xor eax, 0xacede0
sub dword [ecx + 0xe8], eax
mov eax, edx
mov ecx, dword [0x4b570c]
imul eax, edx
add dword [ecx + 0xf8], eax
mov ecx, dword [esi + 0x58]
mov eax, ecx
xor eax, 0xa3ce3
imul eax, dword [esi + 0xa0]
inc edx
mov dword [esi + 0xa0], eax
cmp edx, dword [0x5070fc]
jbe 0x404af7
jmp 0x404ca4
mov edx, dword [0x4b570c]
mov eax, dword [edx + 0xe4]
sub eax, 0x2278
cmp dword [0x507174], eax
jne 0x404c3a
mov eax, dword [esi + 0x7c]
imul eax, dword [esp + 0x20]
add eax, dword [0x507188]
cmp edi, eax
jbe 0x404c27
mov eax, dword [esp + 0x20]
add eax, 0x2326
mov dword [esp + 0x2c], edi
mov dword [esp + 0x14], eax
cmp edi, eax
jl 0x404c17
mov eax, ebx
mov ebx, dword [esp + 0x24]
sub eax, ecx
imul eax, eax, 0x21bc
mov dword [esp + 0x20], eax
mov eax, dword [edx + 0xd0]
mov edi, dword [esp + 0x10]
and eax, 0x2408
or eax, dword [esi + 0x98]
mov ecx, dword [esi + 0x40]
sub ebx, eax
mov eax, dword [esi + 0x44]
sub edi, ebx
imul eax, edi
or eax, 0x21bc
push eax
lea eax, [ecx - 0x272a]
push eax
mov eax, dword [edx + 0xe4]
and eax, dword [0x507120]
push eax
mov eax, dword [edx + 0x88]
or eax, ebp
push eax
push dword [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, dword [esp + 0x2c]
mov edx, dword [0x4b570c]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x14]
jge 0x404bae
mov ebx, dword [esp + 0x18]
mov eax, dword [edx + 0xe0]
xor eax, 0x1cd7
sub dword [edx + 0x7c], eax
jmp 0x404c34
or ebp, 0x272a
push ebp
call dword [sym.imp.KERNEL32.dll_ReleaseActCtx]
mov edx, dword [0x4b570c]
mov eax, ebx
xor eax, edi
cmp dword [esi + 0x80], eax
jbe 0x404ca4
mov eax, dword [esi + 0x118]
imul eax, ebx
sub eax, 0x2394
cmp dword [edx + 0xd0], eax
jb 0x404ca4
lea eax, [edi + 0x269d]
xor eax, 0x2326
or ebx, eax
mov eax, dword [edx + 0xe0]
or eax, dword [esp + 0x10]
push esi
push eax
mov eax, dword [edx + 0x3c]
and eax, dword [esi + 4]
imul eax, eax, 0x2326
push eax
mov eax, dword [esi + 0x48]
sub eax, dword [edx + 0x98]
add eax, 0x1fd0
push eax
mov eax, dword [esp + 0x38]
sub eax, dword [0x5070cc]
push eax
call fcn.004049a0
add esp, 0x14
pop edi
pop esi
pop ebp
lea eax, [ebx + 0x298]
pop ebx
add esp, 0xc
ret