Function at 0x40cc58
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2f4
mov eax, dword [str.WaitForSingleObject]
xor eax, esp
mov dword [esp + 0x2f0], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov ebx, ecx
mov edi, edx
mov dword [esp + 0x70], eax
mov eax, dword [0x44fe60]
mov esi, 0x44fe60
mov ecx, esi
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x44], eax
mov eax, dword [edi + 4]
xor edi, edi
cmp eax, edi
mov dword [esp + 0x6c], eax
jle 0x40ccd0
lea eax, [esp + 0x44]
push eax
mov eax, ebx
call fcn.0040cbdd
cmp eax, edi
je 0x40ccd0
mov esi, eax
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
call fcn.00405232
mov eax, esi
jmp 0x40d4b8
mov eax, dword [0x44fe60]
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x2c], eax
mov eax, dword [0x44fe60]
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
cmp byte [ebp + 0x10], 0
mov dword [esp + 0x28], eax
jne 0x40cd5e
lea eax, [ebx + 0x54]
lea edi, [esp + 0x30]
call fcn.0040a3bf
lea edi, [esp + 0x2c]
call fcn.00408e6a
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
call fcn.00405232
mov esi, edi
call fcn.0040a1aa
lea eax, [ebx + 0x5c]
lea edi, [esp + 0x28]
call fcn.00408e6a
mov esi, edi
call fcn.0040a1aa
lea esi, [esp + 0x30]
mov ecx, ebx
call fcn.0040d4cf
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
mov eax, edi
call fcn.00402ed5
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
call fcn.00405232
mov esi, 0x44fe60
xor edi, edi
mov ecx, esi
lea esi, [esp + 0x54]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
call fcn.00402c8e
cmp dword [esp + 0x6c], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x20], edi
jle 0x40d1bc
push 0x260
call fcn.0042df1b
mov edi, eax
xor esi, esi
pop ecx
cmp edi, esi
je 0x40ce11
or dword [edi], 0xffffffff
mov byte [edi + 8], 1
xor eax, eax
mov word [edi + 0x28], ax
mov dword [edi + 0x10], esi
mov dword [edi + 0x18], esi
mov dword [edi + 0x1c], esi
mov dword [edi + 0x20], esi
mov dword [edi + 0x24], esi
mov dword [edi + 0x234], esi
mov dword [edi + 0x238], esi
mov dword [edi + 0x23c], esi
mov dword [edi + 0x240], esi
lea eax, [edi + 0x248]
mov dword [eax], esi
mov dword [eax + 4], esi
mov dword [edi + 0x250], esi
mov dword [edi + 0x254], esi
lea esi, [edi + 0x258]
mov ecx, 0x44fe60
call fcn.00402c8e
mov dword [esp + 0x1c], edi
xor esi, esi
jmp 0x40ce15
mov dword [esp + 0x1c], esi
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x14], eax
jne 0x40ce6d
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x1c]
cmp edx, ecx
jb 0x40ce3a
lea edx, [ecx + eax*4]
lea edi, [esp + 0x1c]
cmp edi, edx
jb 0x40d2cf
cmp eax, esi
jne 0x40ce43
xor edi, edi
inc edi
jmp 0x40ce55
mov edi, dword [esp + 0x14]
add edi, edi
cmp edi, esi
jl 0x40ce86
cmp edi, 0x1fffffff
ja 0x40ce86
push 4
push edi
push ecx
call fcn.0042de36
add esp, 0xc
cmp eax, esi
je 0x40ce86
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
lea eax, [eax + ecx*4]
cmp eax, esi
je 0x40ce82
mov ecx, dword [esp + 0x1c]
mov dword [eax], ecx
inc dword [esp + 0x14]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x10]
call fcn.0040d744
cmp dword [0x450b1c], esi
mov edi, dword [eax]
lea eax, [edi + 0x10]
mov dword [esp + 0x30], eax
mov al, byte [ebp + 0x10]
mov dword [esp + 0x34], edi
mov byte [edi + 8], al
jg 0x40cebf
lea eax, [esp + 0x44]
call fcn.00421319
test al, al
je 0x40d2d9
mov eax, dword [0x44fe60]
mov ecx, 0x44fe60
call dword [eax + 0xc]
mov ecx, dword [esp + 0x3c]
add eax, 0x10
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
call fcn.0040d744
cmp byte [ebp + 0x10], 0
mov eax, dword [eax]
je 0x40cfed
mov ecx, dword [esp + 0x3c]
mov dword [edi], eax
mov eax, dword [esp + 0x20]
call fcn.0040d744
mov eax, dword [eax]
lea ecx, [ebx + 0x68]
call fcn.0040d648
mov ecx, dword [esp + 0x3c]
mov esi, eax
mov eax, dword [esp + 0x20]
call fcn.0040d744
mov eax, dword [eax]
lea ecx, [ebx + 0x68]
call fcn.0040d648
mov eax, dword [eax + 8]
shr eax, 1
and al, 1
mov byte [esp + 0x3b], al
mov eax, dword [esi]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x1c], eax
lea eax, [esi + 0x18]
push eax
lea eax, [ebx + 0x5c]
lea ecx, [esp + 0x6c]
call fcn.0040d578
cmp dword [esp + 0x20], 9
pop ecx
je 0x40cf54
cmp dword [esp + 0x1c], 0xa
jne 0x40cf63
add edi, 0x258
lea eax, [esp + 0x68]
call fcn.00408e6a
lea eax, [esp + 0x68]
lea edi, [esp + 0x80]
call fcn.0040a3bf
lea edi, [esp + 0x24]
call fcn.00408e6a
mov eax, dword [esp + 0x80]
add eax, 0xfffffff0
call fcn.00405232
movzx eax, byte [esp + 0x3b]
neg eax
sbb eax, eax
and eax, ebx
je 0x40cf9d
add eax, 4
jmp 0x40cf9f
xor eax, eax
mov edi, dword [esp + 0x30]
lea ecx, [ebx + 0xd0]
push ecx
lea ecx, [esp + 0x28]
push ecx
push eax
push 0
push dword [esi + 0xc]
lea eax, [ebx + 0x54]
push 0
push dword [esi + 0x10]
call fcn.00421395
mov edi, eax
lea eax, [ebx + 0xa4]
push eax
lea eax, [esp + 0x28]
push 1
push eax
call fcn.0040abff
mov eax, dword [esp + 0x74]
add esp, 0xc
add eax, 0xfffffff0
call fcn.00405232
xor esi, esi
jmp 0x40d14f
lea ecx, [ebx + 0x8c]
call fcn.00412df1
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
cmp eax, 9
je 0x40d009
cmp eax, 0xa
jne 0x40d048
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
call fcn.0040d744
mov eax, dword [eax]
lea ecx, [ebx + 0x8c]
call fcn.00412df1
push eax
lea eax, [ebx + 0x5c]
lea ecx, [esp + 0x78]
call fcn.0040d578
pop ecx
add edi, 0x258
call fcn.00408e6a
mov eax, dword [esp + 0x74]
add eax, 0xfffffff0
call fcn.00405232
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
call fcn.0040d744
mov eax, dword [eax]
lea ecx, [ebx + 0x8c]
call fcn.00412df1
push eax
lea eax, [esp + 0x30]
lea ecx, [esp + 0x68]
call fcn.0040d578
mov dword [esp], 0x24c
lea eax, [esp + 0xb0]
push esi
push eax
mov dword [esp + 0xb4], esi
call fcn.0042d890
add esp, 0xc
lea eax, [esp + 0xa8]
push eax
push dword [esp + 0x68]
call dword [0x440118]
push 1
push esi
push esi
push dword [esp + 0xd0]
mov dword [esp + 0xb0], eax
call fcn.0043e130
mov ecx, dword [esp + 0xc8]
xor edi, edi
add eax, ecx
adc edx, edi
cmp dword [esp + 0x1c], 6
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], edx
je 0x40d0db
cmp dword [esp + 0x1c], 7
jne 0x40d0e1
lea eax, [esp + 0x28]
jmp 0x40d0e4
lea eax, [ebx + 0x5c]
lea edi, [esp + 0x24]
call fcn.00408e6a
lea eax, [ebx + 0xd0]
push eax
mov eax, edi
mov edi, dword [esp + 0x34]
push eax
push esi
push dword [esp + 0x88]
lea eax, [esp + 0x74]
push dword [esp + 0x88]
push esi
push esi
call fcn.00421395
mov edi, eax
lea eax, [ebx + 0xa4]
push eax
lea eax, [esp + 0x28]
push 1
push eax
call fcn.0040abff
add esp, 0xc
cmp dword [esp + 0xa0], esi
je 0x40d143
push dword [esp + 0xa0]
call dword [0x440124]
mov eax, dword [esp + 0x64]
add eax, 0xfffffff0
call fcn.00405232
cmp edi, esi
jne 0x40d383
cmp byte [ebx + 0x84], 0
je 0x40d17a
cmp dword [esp + 0x1c], 6
jne 0x40d17a
lea ebx, [esp + 0x24]
lea esi, [esp + 0x48]
call fcn.00409b59
mov ebx, dword [esp + 0x40]
xor esi, esi
mov eax, dword [esp + 0x70]
cmp dword [eax], esi
je 0x40d19c
push dword [esp + 0x30]
call dword [0x450b24]
mov ecx, dword [esp + 0x34]
mov dword [ecx + 0x250], eax
mov dword [ecx + 0x254], edx
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00405232
inc dword [esp + 0x20]
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x6c]
jl 0x40cd9b
xor edi, edi
mov eax, dword [ebp + 8]
mov esi, dword [esp + 0x70]
mov dword [esp + 0x88], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x8c], eax
mov eax, esi
lea ecx, [esp + 0x84]
mov dword [esp + 0x84], ebx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x98], edi
mov dword [esp + 0x9c], edi
call fcn.00421d0a
mov dword [esp + 0x40], eax
cmp eax, edi
je 0x40d3dd
mov esi, dword [0x440068]
cmp dword [esp + 0x98], edi
je 0x40d22a
push dword [esp + 0x98]
call esi
mov dword [esp + 0x98], edi
cmp dword [esp + 0x5c], edi
je 0x40d23a
push dword [esp + 0x5c]
call esi
mov dword [esp + 0x5c], edi
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
call fcn.00405232
lea esi, [esp + 0x48]
call fcn.004093b1
mov eax, dword [esp + 0x14]
xor ebx, ebx
cmp eax, edi
mov dword [esp + 0x34], eax
jle 0x40d292
mov eax, ebx
lea ecx, [esp + 0x10]
call fcn.0040d744
mov esi, dword [eax]
cmp esi, edi
je 0x40d28b
mov eax, dword [esi + 0x258]
sub eax, 0x10
call fcn.00405232
lea eax, [esi + 0x10]
call fcn.004212b8
push esi
call fcn.0042d860
pop ecx
inc ebx
cmp ebx, dword [esp + 0x34]
jl 0x40d25d
cmp dword [esp + 0x10], edi
je 0x40d2a6
push dword [esp + 0x10]
call fcn.0042dd47
pop ecx
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
call fcn.00405232
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
call fcn.00405232
mov esi, dword [esp + 0x40]
jmp 0x40ccbd
push 0x80004005
call fcn.0040520e
cmp dword [esp + 0x5c], esi
je 0x40d2ed
push dword [esp + 0x5c]
call dword [0x440068]
mov dword [esp + 0x5c], esi
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
call fcn.00405232
lea esi, [esp + 0x48]
call fcn.004093b1
mov eax, dword [esp + 0x14]
xor ebx, ebx
xor edi, edi
cmp eax, ebx
mov dword [esp + 0x34], eax
jle 0x40d347
mov eax, edi
lea ecx, [esp + 0x10]
call fcn.0040d744
mov esi, dword [eax]
cmp esi, ebx
je 0x40d340
mov eax, dword [esi + 0x258]
sub eax, 0x10
call fcn.00405232
lea eax, [esi + 0x10]
call fcn.004212b8
push esi
call fcn.0042d860
pop ecx
inc edi
cmp edi, dword [esp + 0x34]
jl 0x40d312
cmp dword [esp + 0x10], ebx
je 0x40d35b
push dword [esp + 0x10]
call fcn.0042dd47
pop ecx
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
call fcn.00405232
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
call fcn.00405232
push 0xb
pop esi
jmp 0x40ccbd
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00405232
cmp dword [esp + 0x5c], esi
je 0x40d3a3
push dword [esp + 0x5c]
call dword [0x440068]
mov dword [esp + 0x5c], esi
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
call fcn.00405232
lea esi, [esp + 0x48]
call fcn.004093b1
lea esi, [esp + 0x10]
call fcn.0040d6e5
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
call fcn.00405232
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
call fcn.00405232
push 0xe
jmp 0x40d37d
mov eax, dword [esi + 8]
lea ecx, [esp + 0x48]
call fcn.004214d3
mov esi, dword [0x440068]
mov dword [esp + 0x40], eax
cmp dword [esp + 0x98], edi
je 0x40d40c
push dword [esp + 0x98]
call esi
mov dword [esp + 0x98], edi
cmp dword [esp + 0x5c], edi
je 0x40d41c
push dword [esp + 0x5c]
call esi
mov dword [esp + 0x5c], edi
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
call fcn.00405232
lea esi, [esp + 0x48]
call fcn.004093b1
mov eax, dword [esp + 0x14]
xor ebx, ebx
cmp eax, edi
mov dword [esp + 0x34], eax
jle 0x40d474
mov eax, ebx
lea ecx, [esp + 0x10]
call fcn.0040d744
mov esi, dword [eax]
cmp esi, edi
je 0x40d46d
mov eax, dword [esi + 0x258]
sub eax, 0x10
call fcn.00405232
lea eax, [esi + 0x10]
call fcn.004212b8
push esi
call fcn.0042d860
pop ecx
inc ebx
cmp ebx, dword [esp + 0x34]
jl 0x40d43f
cmp dword [esp + 0x10], edi
je 0x40d488
push dword [esp + 0x10]
call fcn.0042dd47
pop ecx
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
call fcn.00405232
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
call fcn.00405232
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
call fcn.00405232
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x2fc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0042d86b
mov esp, ebp
pop ebp
ret 0xc