Function at 0x404fba
Capabilities:
Persist via run registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4e4
mov eax, dword [0x409044]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x4cc], eax
mov eax, dword [ebp + 8]
and eax, 1
mov dword [ebp - 0x4b8], ecx
mov dword [ebp - 0x4d0], eax
neg eax
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, edx
sbb eax, eax
mov dword [ebp - 0x4bc], esi
lea edx, [ebp - 0x4c4]
mov dword [ebp - 0x4e0], edi
push edx
and eax, 0x10006
add eax, 0x20019
push eax
push 0
push esi
push ecx
call dword [section..idata]
test eax, eax
jne 0x405408
push ebx
lea eax, [ebp - 0x4d4]
xor ebx, ebx
push eax
mov eax, 0x401b5c
push eax
push eax
push edi
call dword [0x40a0e0]
test byte [0x4095c1], 0x40
je 0x405051
push esi
mov edx, 0x401478
call fcn.0040541c
xor eax, eax
lea ecx, [ebp - 0x4d8]
mov dword [ebp - 0x4c0], eax
push ecx
lea ecx, [ebp - 0x4b4]
mov dword [ebp - 0x4dc], 0x50
push ecx
lea ecx, [ebp - 0x4c8]
mov dword [ebp - 0x4d8], 0x208
push ecx
push 0
lea ecx, [ebp - 0x4dc]
push ecx
lea ecx, [ebp - 0xa4]
push ecx
push eax
push dword [ebp - 0x4c4]
call dword [0x40a00c]
mov edi, eax
cmp edi, 0xea
je 0x4051e0
test edi, edi
jne 0x4051ec
mov eax, dword [ebp - 0x4c8]
cmp eax, 1
je 0x4050c9
cmp eax, 2
jne 0x4051e0
mov ecx, dword [ebp - 0x4d4]
test ecx, ecx
je 0x4050f8
mov eax, dword [ecx]
lea edx, [ebp - 0xa4]
push edx
push ecx
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x40a37c]
call esi
test eax, eax
je 0x4051e0
mov eax, dword [ebp - 0x4c8]
mov edi, 0x104
cmp eax, 2
jne 0x405145
push ecx
lea eax, [ebp - 0x4b4]
mov edx, edi
push eax
push ecx
lea ecx, [ebp - 0x2ac]
call fcn.0040316a
test eax, eax
js 0x4051e0
push edi
lea eax, [ebp - 0x4b4]
push eax
lea eax, [ebp - 0x2ac]
push eax
call dword [0x40a0d4]
test eax, eax
je 0x4051e0
cmp eax, edi
ja 0x4051e0
push 0x43
call dword [0x40a170]
test eax, eax
je 0x40515f
cmp word [ebp - 0xa4], 0x2a
jne 0x4051e0
push 0x618
push 0x40
call dword [0x40a070]
mov esi, eax
test esi, esi
je 0x4051e0
push dword [ebp - 0x4bc]
mov edx, edi
mov ecx, esi
call fcn.0040374f
test eax, eax
js 0x4051e0
lea eax, [ebp - 0xa4]
mov edx, edi
push eax
lea ecx, [esi + 0x208]
call fcn.0040374f
test eax, eax
js 0x4051e0
lea eax, [ebp - 0x4b4]
mov edx, edi
push eax
lea ecx, [esi + 0x410]
call fcn.0040374f
test eax, eax
js 0x4051e0
test ebx, ebx
jne 0x4051c7
push 5
call dword [0x40a034]
mov ebx, eax
test ebx, ebx
je 0x4051d9
push esi
push 0x7fffffff
push ebx
call dword [0x40a030]
cmp eax, 0xffffffff
jne 0x4051e0
push esi
call dword [0x40a09c]
mov eax, dword [ebp - 0x4c0]
inc eax
jmp 0x405053
sub edi, 0x103
neg edi
sbb edi, edi
not edi
and edi, 1
mov dword [ebp - 0x4e4], edi
test ebx, ebx
je 0x4053c5
push 0x200
lea eax, [ebp - 0x2a4]
push 0
push eax
call fcn.00408e3b
mov esi, dword [ebp - 0x4bc]
add esp, 0xc
cmp dword [ebp - 0x4b8], 0x80000002
jne 0x40527c
push 1
push 0xffffffffffffffff
push esi
push 0xffffffffffffffff
push 0x401740
call dword [0x40a258]
cmp eax, 2
jne 0x40527c
lea eax, [ebp - 0x4b8]
mov dword [ebp - 0x4b8], 0x200
push eax
lea eax, [ebp - 0x2a4]
push eax
push 0
push 0x20000002
push 0x401a8c
push 0x401ac0
push 0x80000002
call dword [0x40a24c]
mov eax, dword [ebx]
xor ecx, ecx
mov dword [ebp - 0x4b8], eax
mov dword [ebp - 0x4c0], ecx
test eax, eax
jle 0x4053bc
push 0x21
pop edx
mov edi, eax
cmp dword [ebp - 0x4d0], 0
mov eax, dword [ebx + 4]
mov esi, dword [eax + ecx*4]
mov dword [ebp - 0x4b8], esi
je 0x4052ce
lea eax, [esi + 0x208]
cmp word [eax], dx
je 0x4052ce
push eax
push dword [ebp - 0x4c4]
call dword [0x40a004]
test eax, eax
jne 0x405391
cmp word [ebp - 0x2a4], 0
je 0x405340
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x2a4]
push eax
push 0xffffffffffffffff
lea eax, [esi + 0x208]
push eax
call dword [0x40a258]
cmp eax, 2
jne 0x405340
push 0x401b20
push 1
push 1
push 0
call dword [0x40a270]
mov esi, eax
test esi, esi
je 0x40531c
push esi
call dword [0x40a290]
push esi
call dword [0x40a098]
push 0x401a8c
push 0x401ac0
push 0x80000002
call dword [0x40a0d0]
mov esi, dword [ebp - 0x4b8]
xor eax, eax
mov word [ebp - 0x2a4], ax
push dword [ebp + 0x14]
lea eax, [esi + 0x410]
push dword [ebp - 0x4e0]
lea ecx, [esi + 0x208]
push dword [ebp + 8]
push eax
push ecx
mov ecx, dword [ebp - 0x4cc]
push esi
call dword [0x40a37c]
call dword [ebp - 0x4cc]
cmp dword [ebp - 0x4d0], 0
je 0x405391
push 0x21
lea eax, [esi + 0x208]
pop ecx
cmp word [eax], cx
jne 0x405391
push eax
push dword [ebp - 0x4c4]
call dword [0x40a004]
push esi
call dword [0x40a09c]
mov ecx, dword [ebp - 0x4c0]
inc ecx
mov dword [ebp - 0x4c0], ecx
push 0x21
pop edx
cmp ecx, edi
jl 0x405299
mov edi, dword [ebp - 0x4e4]
mov esi, dword [ebp - 0x4bc]
push ebx
call dword [0x40a02c]
jmp 0x4053cb
mov esi, dword [ebp - 0x4bc]
test byte [0x4095c1], 0x40
pop ebx
je 0x4053e0
push esi
mov edx, 0x4013f8
call fcn.0040541c
push dword [ebp - 0x4c4]
call dword [0x40a008]
mov ecx, dword [ebp - 0x4d4]
test ecx, ecx
je 0x40540a
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x40a37c]
call esi
jmp 0x40540a
xor edi, edi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.004086e0
leave
ret 0x10