Function at 0x40c020
Capabilities:
Check if file exists
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x52c8d7
mov eax, dword fs:[0]
push eax
sub esp, 0x890
mov eax, dword [0x56b1dc]
xor eax, esp
mov dword [esp + 0x888], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x56b1dc]
xor eax, esp
push eax
lea eax, [esp + 0x8a4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x8b4]
lea ebx, [esp + 0x20]
mov dword [esp + 0x90], eax
call fcn.0045e390
mov dword [esp + 0x8ac], 0
mov edx, dword [esp + 0x20]
mov eax, dword [edx - 0xc]
test eax, eax
jle 0x40c0ae
lea ecx, [eax - 1]
test ecx, ecx
jl 0x40c26a
cmp ecx, eax
jg 0x40c26a
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x40c0ae
push 0x5c
mov edi, ebx
call fcn.004118c0
lea edi, [esp + 0x28]
call fcn.0045e680
mov byte [esp + 0x8ac], 1
mov edx, dword [esp + 0x28]
mov eax, dword [edx - 0xc]
test eax, eax
jle 0x40c0ee
lea ecx, [eax - 1]
test ecx, ecx
jl 0x40c26a
cmp ecx, eax
jg 0x40c26a
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x40c0ee
push 0x5c
call fcn.004118c0
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x1c]
push edx
mov ebx, str.celldict.dat
call fcn.004036c0
add esp, 8
mov byte [esp + 0x8ac], 2
mov eax, dword [esp + 0x18]
mov esi, dword [0x5313c0]
push eax
call esi
test eax, eax
jne 0x40c169
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.004036c0
add esp, 8
lea edi, [esp + 0x18]
mov byte [esp + 0x8ac], 3
call fcn.00401dd0
mov byte [esp + 0x8ac], 2
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c169
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ebx, ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], 0xa
mov dword [esp + 0x84], ebx
mov byte [esp + 0x8ac], 4
mov ecx, dword [esp + 0x18]
push ecx
call esi
test eax, eax
je 0x40cd0a
mov edx, dword [esp + 0x18]
push edx
push ebx
push str.itemcount
push str.dialect
call dword [0x53133c]
mov esi, eax
mov eax, dword [0x5759e8]
mov edx, dword [eax + 0xc]
mov ecx, 0x5759e8
mov dword [esp + 0x24], esi
call edx
lea ebp, [eax + 0x10]
mov dword [esp + 0x30], ebp
xor eax, eax
cmp esi, ebx
mov byte [esp + 0x8ac], 5
mov dword [esp + 0x1c], eax
jbe 0x40c65a
lea esp, [esp]
push eax
push str.item_u
lea edi, [esp + 0x38]
call fcn.00401f20
mov eax, dword [0x5759e8]
mov edx, dword [eax + 0xc]
add esp, 8
mov ecx, 0x5759e8
call edx
lea ebp, [eax + 0x10]
mov dword [esp + 0x14], ebp
mov byte [esp + 0x8ac], 6
mov eax, dword [ebp - 8]
mov esi, dword [esp + 0x18]
mov ecx, 1
sub ecx, dword [ebp - 4]
sub eax, 0x400
or eax, ecx
jge 0x40c24a
mov ecx, 0x400
lea eax, [esp + 0x14]
call fcn.00402120
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
push esi
push 0x400
push ebp
push ebx
push eax
push str.dialect
call dword [0x531350]
cmp ebp, ebx
jne 0x40c274
xor eax, eax
jmp 0x40c291
push 0x80070057
call fcn.004026a0
mov eax, ebp
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40c280
sub eax, edx
sar eax, 1
js 0x40c26a
cmp eax, dword [ebp - 8]
jg 0x40c26a
mov dword [ebp - 0xc], eax
mov word [ebp + eax*2], bx
cmp dword [ebp - 0xc], ebx
jne 0x40c2c0
lea eax, [ebp - 0x10]
mov byte [esp + 0x8ac], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40c633
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
push 0x2c
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0x8b8], 7
call fcn.00466500
mov eax, dword [esp + 0x44]
add esp, 0xc
cmp eax, 5
jae 0x40c313
mov edi, dword [esp + 0x34]
cmp edi, ebx
je 0x40c2a3
mov ebx, eax
call fcn.00401fc0
mov eax, dword [esp + 0x34]
push eax
call fcn.004ff948
add esp, 4
jmp 0x40c2a3
cmp eax, 3
jbe 0x40c26a
mov esi, dword [esp + 0x34]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0xc]
mov ecx, dword [ecx - 0xc]
add esi, 0xc
sub eax, 0x10
mov edx, 1
sub edx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, ecx
or eax, edx
jge 0x40c347
mov eax, esi
call fcn.00402120
mov esi, dword [esi]
push 0xa
push 0
push esi
call fcn.0050095a
add esp, 0xc
cmp dword [esp + 0x38], 3
mov ebp, eax
jbe 0x40c26a
mov esi, dword [esp + 0x34]
mov edx, dword [esi + 0xc]
add esi, 0xc
test edx, edx
jne 0x40c375
xor eax, eax
jmp 0x40c395
mov eax, edx
lea edi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c380
sub eax, edi
sar eax, 1
js 0x40c26a
cmp eax, dword [edx - 8]
jg 0x40c26a
mov dword [edx - 0xc], eax
mov edx, dword [esi]
mov word [edx + eax*2], 0
mov eax, dword [0x5759e8]
mov edx, dword [eax + 0xc]
mov ecx, 0x5759e8
call edx
add eax, 0x10
lea esi, [esp + 0x58]
mov dword [esp + 0x54], eax
call fcn.00405450
mov bl, 8
mov byte [esp + 0x8ac], bl
cmp dword [esp + 0x38], 0
jbe 0x40c26a
mov eax, dword [esp + 0x34]
lea edi, [esp + 0x5c]
call fcn.00401dd0
cmp dword [esp + 0x38], 1
jbe 0x40c26a
mov eax, dword [esp + 0x34]
add eax, 4
lea edi, [esp + 0x60]
call fcn.00401dd0
cmp dword [esp + 0x38], 2
jbe 0x40c26a
mov eax, dword [esp + 0x34]
add eax, 8
mov edi, esi
call fcn.00401dd0
cmp dword [esp + 0x38], 4
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x64], ebp
mov dword [esp + 0x6c], eax
jbe 0x40c26a
mov eax, dword [esp + 0x34]
add eax, 0x10
lea edi, [esp + 0x54]
call fcn.00401dd0
mov eax, dword [esp + 0x38]
cmp eax, 5
jbe 0x40c4d5
mov esi, dword [esp + 0x34]
mov ecx, dword [esi + 0x14]
add esi, 0x14
cmp dword [ecx - 0xc], 0
je 0x40c4d5
cmp eax, 5
jbe 0x40c26a
call fcn.0040d4a0
test al, al
je 0x40c4d5
cmp dword [esp + 0x38], 5
jbe 0x40c26a
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x2c]
push 0x535ba0
add ecx, 0x14
push edx
call fcn.0040d2f0
add esp, 8
mov byte [esp + 0x8ac], 9
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov eax, edi
push eax
call fcn.00411670
mov byte [esp + 0x8ac], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c4d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x38]
xor eax, eax
cmp ecx, 6
jbe 0x40c584
mov esi, dword [esp + 0x34]
mov edx, dword [esi + 0x18]
add esi, 0x18
cmp dword [edx - 0xc], eax
je 0x40c584
cmp ecx, 6
jbe 0x40c26a
mov eax, edx
mov ecx, dword [eax - 0xc]
sub eax, 0x10
mov edx, 1
sub edx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, ecx
or eax, edx
jge 0x40c520
mov eax, esi
call fcn.00402120
mov esi, dword [esi]
push 0xa
push 0
push esi
call fcn.0050095a
add esp, 0xc
cmp dword [esp + 0x38], 6
mov ebx, eax
jbe 0x40c26a
mov edi, dword [esp + 0x34]
mov esi, dword [edi + 0x18]
add edi, 0x18
test esi, esi
jne 0x40c54e
xor ecx, ecx
jmp 0x40c568
mov ecx, esi
lea eax, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x40c553
sub ecx, eax
sar ecx, 1
js 0x40c26a
cmp ecx, dword [esi - 8]
jg 0x40c26a
xor eax, eax
cmp eax, ebx
mov dword [esi - 0xc], ecx
mov edx, dword [edi]
sbb eax, eax
mov word [edx + ecx*2], 0
neg eax
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x74]
mov edi, eax
push edx
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], edi
call fcn.0040f890
test eax, eax
jne 0x40c5c2
lea eax, [esp + 0x88]
push eax
lea eax, [esp + 0x58]
lea ebx, [esp + 0x74]
call fcn.0040f6a0
jmp 0x40c5c8
mov dword [eax + 0x1c], esi
mov dword [eax + 0x20], edi
lea esi, [esp + 0x58]
mov byte [esp + 0x8ac], 7
call fcn.004058b0
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c5f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x34]
test edi, edi
je 0x40c617
mov ebx, dword [esp + 0x38]
call fcn.00401fc0
mov ecx, dword [esp + 0x34]
push ecx
call fcn.004ff948
add esp, 4
mov byte [esp + 0x8ac], 5
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c63f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 1
xor ebx, ebx
cmp eax, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
jb 0x40c1f0
mov ebp, dword [esp + 0x30]
cmp dword [esp + 0x74], ebx
jne 0x40c727
lea eax, [ebp - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x8ac], 4
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c688
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x70]
call fcn.00410950
mov eax, dword [esp + 0x84]
cmp eax, ebx
je 0x40c6a5
push eax
call fcn.004ff948
add esp, 4
mov byte [esp + 0x8ac], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c6cd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x8ac], 0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c6f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x8ac], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c720
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40cda7
lea ecx, [esp + 0x50]
push ecx
push 0x20019
push ebx
push str.SOFTWARETencentQQPinyinCityInfoFetch
push 0x80000001
call dword [section..rdata]
test eax, eax
je 0x40c763
lea eax, [ebp - 0x10]
mov byte [esp + 0x8ac], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40c67c
mov edx, dword [0x5759e8]
mov eax, dword [edx + 0xc]
mov ecx, 0x5759e8
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push 0x800
lea ecx, [esp + 0xa0]
push ebx
mov byte [esp + 0x8b4], 0xa
push ecx
mov dword [esp + 0xa0], 0x400
call fcn.00508d80
mov ecx, dword [esp + 0x5c]
mov esi, dword [0x531040]
add esp, 0xc
lea edx, [esp + 0x94]
push edx
lea eax, [esp + 0xa0]
push eax
push ebx
push ebx
push str.province
push ecx
call esi
test eax, eax
jne 0x40c815
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0xa0]
call fcn.00402550
lea edi, [esp + 0x14]
mov byte [esp + 0x8ac], 0xb
call fcn.00401dd0
mov byte [esp + 0x8ac], 0xa
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c815
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x5759e8]
mov eax, dword [edx + 0xc]
mov ecx, 0x5759e8
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
push 0x800
lea ecx, [esp + 0xa0]
push ebx
push ecx
mov byte [esp + 0x8b8], 0xc
call fcn.00508d80
mov ecx, dword [esp + 0x5c]
add esp, 0xc
lea edx, [esp + 0x94]
push edx
lea eax, [esp + 0xa0]
push eax
push ebx
push ebx
push str.city
push ecx
call esi
test eax, eax
jne 0x40c8b6
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0xa0]
call fcn.00402550
lea edi, [esp + 0x1c]
mov byte [esp + 0x8ac], 0xd
call fcn.00401dd0
mov byte [esp + 0x8ac], 0xc
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c8b6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x50]
push ecx
call dword [0x531004]
mov esi, dword [esp + 0x14]
cmp dword [esi - 0xc], ebx
jne 0x40c91f
mov byte [esp + 0x8ac], 0xa
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c8f2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x8ac], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c664
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40c664
mov ecx, dword [esp + 0x70]
cmp ecx, ebx
mov esi, dword [esp + 0x84]
mov dword [esp + 0x2c], ebx
je 0x40c94b
cmp ecx, esi
je 0x40c94b
mov eax, dword [ecx + 0x28]
cmp eax, esi
mov edx, ecx
je 0x40c94d
nop
mov edx, eax
mov eax, dword [edx + 0x28]
cmp eax, esi
jne 0x40c940
jmp 0x40c94d
xor edx, edx
test edx, edx
mov ebp, edx
je 0x40cb89
xor ecx, ecx
test ebp, ebp
setne cl
mov esi, ecx
test esi, esi
je 0x40cbab
mov eax, dword [ebp]
sub eax, 0x10
call fcn.004020b0
add eax, 0x10
mov dword [esp + 0x54], eax
lea edx, [esp + 0x58]
lea edi, [ebp + 4]
push edx
mov byte [esp + 0x8b0], 0xe
call fcn.0040a070
test esi, esi
mov byte [esp + 0x8ac], 0xf
je 0x40cbab
mov edx, dword [ebp + 0x2c]
mov ecx, dword [esp + 0x84]
cmp edx, ecx
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x20]
mov dword [esp + 0x88], eax
je 0x40c9d8
test edx, edx
je 0x40c9d2
mov eax, dword [edx + 0x28]
cmp eax, ecx
je 0x40c9d4
mov edx, eax
mov eax, dword [edx + 0x28]
cmp eax, ecx
jne 0x40c9c5
mov ebp, edx
jmp 0x40c9f8
xor edx, edx
mov ebp, edx
jmp 0x40c9f8
mov eax, dword [ebp + 0x30]
cmp eax, ecx
je 0x40c9f4
nop
cmp ebp, dword [eax + 0x2c]
jne 0x40c9f0
mov ebp, eax
mov eax, dword [eax + 0x30]
cmp eax, ecx
jne 0x40c9e0
jmp 0x40c9f4
cmp eax, ecx
jne 0x40c9f6
xor eax, eax
mov ebp, eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x9c]
push edx
mov ebx, 0x535ba0
call fcn.004036c0
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x30]
push edx
mov ebx, eax
mov byte [esp + 0x8bc], 0x10
call fcn.0040d230
add esp, 0x10
push eax
lea ecx, [esp + 0x58]
mov byte [esp + 0x8b0], 0x11
call fcn.00405710
mov bl, al
mov byte [esp + 0x8ac], 0x10
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ca67
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x8ac], 0xf
mov eax, dword [esp + 0x98]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ca92
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x40cae4
push esi
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0xa4], esp
push ecx
lea edi, [esp + 0x78]
mov dword [esp + 0x4c], 1
call fcn.0040a070
lea ebx, [esp + 0x50]
call fcn.0040e4f0
add esp, 0x1c
mov ecx, dword [esp + 0x90]
mov byte [esp + 0x8ac], 0x12
push eax
mov eax, dword [esp + 0x5c]
add ecx, 0x60
call fcn.0040e320
mov esi, ebx
call fcn.004058b0
mov byte [esp + 0x8ac], 0xc
mov eax, dword [esp + 0x60]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40cb0c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x5c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cb2c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x58]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cb4c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cb6c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebp, ebp
jne 0x40c957
cmp dword [esp + 0x2c], ebp
jne 0x40cc92
mov esi, dword [esp + 0x84]
mov ecx, dword [esp + 0x70]
test ecx, ecx
je 0x40cbb5
cmp ecx, esi
je 0x40cbb5
mov eax, dword [ecx + 0x28]
cmp eax, esi
mov edx, ecx
je 0x40cbb7
lea ebx, [ebx]
mov edx, eax
mov eax, dword [edx + 0x28]
cmp eax, esi
jne 0x40cba0
jmp 0x40cbb7
push 0x80004005
call fcn.004026a0
xor edx, edx
test edx, edx
mov ebp, edx
je 0x40cc92
xor ecx, ecx
test ebp, ebp
setne cl
mov esi, ecx
test esi, esi
je 0x40cbab
lea edx, [esp + 0x54]
push edx
mov ecx, ebp
call fcn.0040a000
test esi, esi
mov byte [esp + 0x8ac], 0x13
je 0x40cbab
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x20]
lea ecx, [esp + 0x70]
mov dword [esp + 0x88], eax
push ecx
mov eax, ebp
call fcn.0040f650
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x58]
mov ebp, eax
call fcn.00405710
test al, al
je 0x40cc59
push esi
sub esp, 0x18
mov eax, esp
mov dword [esp + 0xa4], esp
push eax
lea edi, [esp + 0x78]
call fcn.0040a070
lea ebx, [esp + 0x50]
call fcn.0040e4f0
add esp, 0x1c
mov ecx, dword [esp + 0x90]
mov byte [esp + 0x8ac], 0x14
push eax
mov eax, dword [esp + 0x5c]
add ecx, 0x60
call fcn.0040e320
mov esi, ebx
call fcn.004058b0
lea esi, [esp + 0x58]
mov byte [esp + 0x8ac], 0xc
call fcn.004058b0
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cc8a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebp, ebp
jne 0x40cbc1
mov byte [esp + 0x8ac], 0xa
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ccba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x8ac], 5
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cce2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x8ac], 4
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cd0a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x70]
call fcn.00410950
mov eax, dword [esp + 0x84]
test eax, eax
je 0x40cd27
push eax
call fcn.004ff948
add esp, 4
mov byte [esp + 0x8ac], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cd4f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x8ac], 0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cd77
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x8ac], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cda2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x8a4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x888]
xor ecx, esp
call fcn.004ff939
add esp, 0x89c
ret 4