Function at 0x406165
Capabilities:
Contain obfuscated stackstrings
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
cmp dword [ebp + 0x10], 0
jbe 0x406190
movzx eax, byte [ebp + 0x14]
test eax, eax
je 0x406190
movzx eax, word [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.00405cf0
pop ecx
pop ecx
jmp 0x406a9b
cmp dword [ebp + 0x10], 0
jne 0x406548
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
call fcn.00404b35
mov dword [ebp - 0x48], eax
cmp dword [0xaa7118], 0
jne 0x40651c
mov dword [ebp - 0xd4], 0x15a4
lea eax, [ebp - 0xd4]
push eax
call fcn.00405bf5
pop ecx
mov dword [ebp - 0xbc], eax
mov byte [ebp - 0x84], 7
mov byte [ebp - 0x83], 0x6a
mov byte [ebp - 0x82], 8
mov byte [ebp - 0x81], 0x72
mov byte [ebp - 0x80], 5
mov byte [ebp - 0x7f], 0x77
mov byte [ebp - 0x7e], 6
mov byte [ebp - 0x7d], 0x7a
mov byte [ebp - 0x7c], 2
mov byte [ebp - 0x7b], 0x7d
mov byte [ebp - 0x7a], 0xc
mov byte [ebp - 0x79], 0x62
mov byte [ebp - 0x78], 3
mov byte [ebp - 0x77], 0x63
mov byte [ebp - 0x76], 0xb
mov byte [ebp - 0x75], 0x87
mov byte [ebp - 0x74], 4
mov byte [ebp - 0x73], 0x80
mov byte [ebp - 0x72], 0x1b
mov byte [ebp - 0x71], 0xc5
mov byte [ebp - 0x70], 0xa
mov byte [ebp - 0x6f], 0x56
mov byte [ebp - 0x6e], 1
mov byte [ebp - 0x6d], 0x78
mov byte [ebp - 0x6c], 0
mov byte [ebp - 0x6b], 0x5c
mov byte [ebp - 0x6a], 4
mov byte [ebp - 0x69], 0x7c
mov byte [ebp - 0x68], 9
mov byte [ebp - 0x67], 0x87
and dword [ebp - 4], 0
and dword [ebp - 0xd0], 0
jmp 0x40626b
mov eax, dword [ebp - 4]
inc eax
inc eax
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x1e
jae 0x4062e1
xor eax, eax
inc eax
imul eax, eax, 0
movzx eax, byte [ebp + eax - 0x84]
lea eax, [eax + eax + 2]
cmp dword [ebp - 4], eax
jne 0x40629c
mov dword [ebp - 0xd0], 4
mov eax, dword [ebp - 4]
inc eax
inc eax
mov dword [ebp - 4], eax
jmp 0x406263
mov eax, dword [ebp - 4]
movzx eax, byte [ebp + eax - 0x83]
sub eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xd0]
lea eax, [eax + ecx - 1]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jge 0x4062ca
mov eax, dword [ebp - 0x30]
add eax, 0x100
mov dword [ebp - 0x30], eax
jmp 0x4062b7
mov eax, dword [ebp - 4]
movzx eax, byte [ebp + eax - 0x84]
mov cl, byte [ebp - 0x30]
mov byte [ebp + eax - 0xec], cl
jmp 0x406263
xor eax, eax
inc eax
imul eax, eax, 0xd
mov byte [ebp + eax - 0xec], 0
lea eax, [ebp - 0xec]
push eax
lea ecx, [ebp - 0x198]
call fcn.00407795
mov edx, dword [ebp - 0xbc]
mov ecx, eax
call fcn.00404b35
mov dword [0xaa7118], eax
lea ecx, [ebp - 0x198]
call fcn.00402be3
and dword [ebp - 0x44], 0
jmp 0x40632b
mov eax, dword [ebp - 0x44]
inc eax
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xe
jae 0x40633e
mov eax, dword [ebp - 0x44]
mov byte [ebp + eax - 0xec], 0
jmp 0x406324
mov byte [ebp - 0xa8], 9
mov byte [ebp - 0xa7], 0x64
mov byte [ebp - 0xa6], 5
mov byte [ebp - 0xa5], 0x68
mov byte [ebp - 0xa4], 3
mov byte [ebp - 0xa3], 0x66
mov byte [ebp - 0xa2], 0xa
mov byte [ebp - 0xa1], 0x6c
mov byte [ebp - 0xa0], 0xb
mov byte [ebp - 0x9f], 0x7c
mov byte [ebp - 0x9e], 0
mov byte [ebp - 0x9d], 0x4e
mov byte [ebp - 0x9c], 0xd
mov byte [ebp - 0x9b], 0x64
mov byte [ebp - 0x9a], 7
mov byte [ebp - 0x99], 0x81
mov byte [ebp - 0x98], 8
mov byte [ebp - 0x97], 0x80
mov byte [ebp - 0x96], 4
mov byte [ebp - 0x95], 0x87
mov byte [ebp - 0x94], 7
mov byte [ebp - 0x93], 0x8c
mov byte [ebp - 0x92], 9
mov byte [ebp - 0x91], 0xfb
mov byte [ebp - 0x90], 0xd7
mov byte [ebp - 0x8f], 0x59
mov byte [ebp - 0x8e], 0xfd
mov byte [ebp - 0x8d], 1
mov byte [ebp - 0x8c], 0x87
mov byte [ebp - 0x8b], 6
mov byte [ebp - 0x8a], 0x67
mov byte [ebp - 0x89], 2
mov byte [ebp - 0x88], 0x7e
mov byte [ebp - 0x87], 0xc
mov byte [ebp - 0x86], 0x8e
and dword [ebp - 8], 0
and dword [ebp - 0xb4], 0
jmp 0x406448
mov eax, dword [ebp - 8]
inc eax
inc eax
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x23
jae 0x4064bf
xor eax, eax
inc eax
imul eax, eax, 0
movzx eax, byte [ebp + eax - 0xa8]
lea eax, [eax + eax + 2]
cmp dword [ebp - 8], eax
jne 0x40647a
mov dword [ebp - 0xb4], 7
mov eax, dword [ebp - 8]
add eax, 5
mov dword [ebp - 8], eax
jmp 0x406440
mov eax, dword [ebp - 8]
movzx eax, byte [ebp + eax - 0xa7]
sub eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xb4]
lea eax, [eax + ecx - 1]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jge 0x4064a8
mov eax, dword [ebp - 0x3c]
add eax, 0x100
mov dword [ebp - 0x3c], eax
jmp 0x406495
mov eax, dword [ebp - 8]
movzx eax, byte [ebp + eax - 0xa8]
mov cl, byte [ebp - 0x3c]
mov byte [ebp + eax - 0xfc], cl
jmp 0x406440
xor eax, eax
inc eax
imul eax, eax, 0xe
mov byte [ebp + eax - 0xfc], 0
lea eax, [ebp - 0xfc]
push eax
lea ecx, [ebp - 0x180]
call fcn.00407795
mov edx, dword [ebp - 0xbc]
mov ecx, eax
call fcn.00404b35
mov dword [0xaa71d0], eax
lea ecx, [ebp - 0x180]
call fcn.00402be3
and dword [ebp - 0x40], 0
jmp 0x406509
mov eax, dword [ebp - 0x40]
inc eax
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0xf
jae 0x40651c
mov eax, dword [ebp - 0x40]
mov byte [ebp + eax - 0xfc], 0
jmp 0x406502
mov eax, dword [0xaa7118]
cmp eax, dword [ebp - 0x48]
je 0x406530
mov eax, dword [0xaa71d0]
cmp eax, dword [ebp - 0x48]
jne 0x406548
mov ecx, dword [ebp + 0xc]
call fcn.00402c3f
push eax
push dword [ebp + 8]
call fcn.00405cf0
pop ecx
pop ecx
jmp 0x406a9b
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x406a99
mov eax, dword [ebp - 0x4c]
movzx eax, word [eax]
cmp eax, 0x5a4d
jne 0x406a99
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x4c]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 0x4550
jne 0x406a99
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x74], 0
jbe 0x406a99
push 8
pop eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx + eax + 0x78], 0
je 0x406a99
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], eax
push 8
pop eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
add edx, dword [ecx + eax + 0x78]
mov dword [ebp - 0x18], edx
mov eax, 0xffff
mov word [ebp - 0xc], ax
or dword [ebp - 0x28], 0xffffffff
cmp dword [ebp + 0x10], 0
jbe 0x4065e9
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [eax + 0x14]
ja 0x4065e4
mov eax, dword [ebp + 0x10]
dec eax
mov word [ebp - 0xc], ax
jmp 0x406769
mov eax, dword [0xaa71dc]
and eax, 1
jne 0x406615
mov eax, dword [0xaa71dc]
or eax, 1
mov dword [0xaa71dc], eax
mov ecx, 0xaa7244
call fcn.00402d4c
push 0x4ab1d0
call fcn.004874bf
pop ecx
movzx eax, byte [0xaa7114]
test eax, eax
je 0x40667b
mov ecx, 0xaa7244
call fcn.00407813
movzx eax, al
test eax, eax
jne 0x40667b
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0xc0]
push eax
mov ecx, 0xaa7244
call fcn.00402d24
lea eax, [ebp - 0x104]
push eax
mov ecx, 0xaa7244
call fcn.00402d16
push eax
lea ecx, [ebp - 0xc0]
call fcn.00402d39
movzx eax, al
test eax, eax
je 0x40667b
lea ecx, [ebp - 0xc0]
call fcn.0040781c
mov eax, dword [eax + 4]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x406769
mov ecx, 0xaa7244
call fcn.00407860
mov ecx, dword [ebp - 0x18]
add eax, dword [ecx + 0x18]
push eax
mov ecx, 0xaa7244
call fcn.00407864
and dword [ebp - 0x20], 0
jmp 0x4066ad
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [eax + 0x18]
jae 0x406769
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x24]
add ecx, dword [eax + 0x20]
mov eax, dword [ebp - 0x20]
lea eax, [ecx + eax*4]
mov dword [ebp - 0xc8], eax
cmp dword [ebp - 0xc8], 0
je 0x406764
mov eax, dword [ebp - 0xc8]
mov ecx, dword [ebp - 0x24]
add ecx, dword [eax]
push ecx
lea ecx, [ebp - 0x150]
call fcn.00407795
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x150]
call fcn.00404b35
mov dword [ebp - 0xcc], eax
movzx eax, byte [0xaa7114]
test eax, eax
je 0x406725
mov ecx, 0xaa7244
call fcn.00407813
movzx eax, al
test eax, eax
jne 0x406742
lea eax, [ebp - 0xcc]
push eax
mov ecx, 0xaa7244
call fcn.00407822
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov byte [0xaa7114], 1
cmp dword [ebp - 0x28], 0xffffffff
jne 0x406759
mov eax, dword [ebp - 0xcc]
cmp eax, dword [ebp - 0x48]
jne 0x406759
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x150]
call fcn.00402be3
jmp 0x4066a6
cmp dword [ebp + 0x10], 0
jne 0x406789
cmp dword [ebp - 0x28], 0xffffffff
je 0x406789
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x24]
add ecx, dword [eax + 0x24]
mov eax, dword [ebp - 0x28]
mov ax, word [ecx + eax*2]
mov word [ebp - 0xc], ax
movzx eax, word [ebp - 0xc]
cmp eax, 0xffff
je 0x406a99
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x24]
add ecx, dword [eax + 0x1c]
movzx eax, word [ebp - 0xc]
lea eax, [ecx + eax*4]
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0xdc]
mov ecx, dword [ebp - 0x24]
add ecx, dword [eax]
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
jbe 0x406a94
push 8
pop eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x18]
add edx, dword [ecx + eax + 0x7c]
cmp dword [ebp - 0x14], edx
jae 0x406a94
mov eax, dword [0xaa71dc]
and eax, 2
jne 0x406808
mov eax, dword [0xaa71dc]
or eax, 2
mov dword [0xaa71dc], eax
push 0x11b6
call fcn.00401ab6
pop ecx
mov byte [0xaa71e4], al
mov byte [ebp - 0x64], 0
mov byte [ebp - 0x63], 0x65
mov byte [ebp - 0x62], 0x11
mov byte [ebp - 0x61], 0xc
mov byte [ebp - 0x60], 0x3f
mov byte [ebp - 0x5f], 0x27
mov byte [ebp - 0x5e], 0x1c
mov byte [ebp - 0x5d], 0xa2
mov byte [ebp - 0x5c], 0x8b
mov byte [ebp - 0x5b], 0x52
mov byte [ebp - 0x5a], 0xab
mov byte [ebp - 0x59], 6
mov byte [ebp - 0x58], 0x76
mov byte [ebp - 0x57], 0x92
mov byte [ebp - 0x56], 0x28
mov byte [ebp - 0x55], 0x15
mov byte [ebp - 0x54], 0xf2
mov byte [ebp - 0x53], 0x5f
mov byte [ebp - 0x52], 0x3c
mov byte [ebp - 0x51], 1
mov byte [ebp - 0x50], 0x6f
mov byte [ebp - 0x4f], 2
mov byte [ebp - 0x4e], 0x71
and dword [ebp - 0x10], 0
and dword [ebp - 0xc4], 0
jmp 0x406879
mov eax, dword [ebp - 0x10]
inc eax
inc eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x17
jae 0x4068e7
xor eax, eax
inc eax
imul eax, eax, 0
movzx eax, byte [ebp + eax - 0x64]
lea eax, [eax + eax + 2]
cmp dword [ebp - 0x10], eax
jne 0x4068a8
mov dword [ebp - 0xc4], 0x11
mov eax, dword [ebp - 0x10]
add eax, 0xf
mov dword [ebp - 0x10], eax
jmp 0x406871
mov eax, dword [ebp - 0x10]
movzx eax, byte [ebp + eax - 0x63]
sub eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc4]
lea eax, [eax + ecx - 1]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jge 0x4068d3
mov eax, dword [ebp - 0x34]
add eax, 0x100
mov dword [ebp - 0x34], eax
jmp 0x4068c0
mov eax, dword [ebp - 0x10]
movzx eax, byte [ebp + eax - 0x64]
mov cl, byte [ebp - 0x34]
mov byte [ebp + eax - 0xac], cl
jmp 0x406871
xor eax, eax
inc eax
imul eax, eax, 3
mov byte [ebp + eax - 0xac], 0
mov eax, dword [0xaa71dc]
and eax, 4
jne 0x406928
mov eax, dword [0xaa71dc]
or eax, 4
mov dword [0xaa71dc], eax
lea eax, [ebp - 0xac]
push eax
mov ecx, 0xaa7228
call fcn.00407795
push 0x4ab1c1
call fcn.004874bf
pop ecx
and dword [ebp - 0x38], 0
jmp 0x406935
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 4
jae 0x406948
mov eax, dword [ebp - 0x38]
mov byte [ebp + eax - 0xac], 0
jmp 0x40692e
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
movsx eax, byte [eax]
movsx ecx, byte [0xaa71e4]
cmp eax, ecx
je 0x406968
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
jmp 0x40694e
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
lea ecx, [ebp - 0x120]
call fcn.00407bcb
push 0xaa7228
lea ecx, [ebp - 0x120]
call fcn.004077c4
lea eax, [ebp - 0x100]
push eax
lea ecx, [ebp - 0x120]
call fcn.00403303
push dword [eax]
lea eax, [ebp - 0x108]
push eax
lea ecx, [ebp - 0x120]
call fcn.004032ef
push dword [eax]
lea ecx, [ebp - 0x168]
call fcn.00407bf4
lea eax, [ebp - 0x168]
push eax
call fcn.00404cc9
pop ecx
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], 0
je 0x406a4b
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x138]
call fcn.00407795
lea edx, [ebp - 0xd8]
lea ecx, [ebp - 0x138]
call fcn.00404be3
movzx eax, al
test eax, eax
je 0x406a22
push 0
push dword [ebp - 0xd8]
push 0
push dword [ebp - 0xb0]
call fcn.00406165
add esp, 0x10
mov dword [ebp - 0x14], eax
jmp 0x406a3e
push 1
push 0
lea eax, [ebp - 0x138]
push eax
push dword [ebp - 0xb0]
call fcn.00406165
add esp, 0x10
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x138]
call fcn.00402be3
jmp 0x406a7e
cmp dword [ebp + 0x10], 0
jne 0x406a61
mov ecx, dword [ebp + 0xc]
call fcn.00402c3f
mov dword [ebp - 0xb8], eax
jmp 0x406a6b
movzx eax, word [ebp + 0x10]
mov dword [ebp - 0xb8], eax
push dword [ebp - 0xb8]
push dword [ebp + 8]
call fcn.00405cf0
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x168]
call fcn.00402abb
lea ecx, [ebp - 0x120]
call fcn.00402be3
mov eax, dword [ebp - 0x14]
jmp 0x406a9b
xor eax, eax
mov esp, ebp
pop ebp
ret