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

Disassembly:
sub esp, 0x70
mov eax, dword [0x45016c]
xor eax, esp
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x7c]
push ebx
mov ebx, dword [esp + 0x78]
push ebp
push esi
push edi
mov edi, dword [esp + 0x88]
xor ebp, ebp
push ebp
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], eax
push dword [edi + 0x38]
call fcn.004113e0
push ebp
push dword [edi + 0x40]
mov esi, eax
mov dword [esp + 0x28], esi
call fcn.004113e0
add esp, 0x10
mov ecx, eax
mov dword [esp + 0x20], ecx
cmp esi, 2
jne 0x40c3ee
cmp ecx, 1
je 0x40c3da
cmp ecx, esi
jne 0x40c405
lea edx, [edi + 0xc]
mov eax, 0x800
or word [edx], ax
mov dword [esp + 0x20], edx
jmp 0x40c48b
cmp esi, 1
jne 0x40c405
cmp ecx, 2
je 0x40c3da
lea esi, [edi + 0xc]
mov edx, 0xf7ff
and word [esi], dx
jmp 0x40c435
lea esi, [edi + 0xc]
mov edx, 0xf7ff
and word [esi], dx
cmp dword [esp + 0x18], 2
jne 0x40c435
lea eax, [ebx + 8]
push eax
push dword [edi + 0x38]
push 0x7075
call fcn.0040cab0
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x40c46d
mov ecx, dword [esp + 0x20]
test dword [esp + 0x14], 0x100
lea eax, [ebx + 8]
mov dword [esp + 0x20], esi
jne 0x40c48b
mov dword [esp + 0x20], esi
cmp ecx, 2
jne 0x40c48b
push eax
push dword [edi + 0x40]
push 0x6375
call fcn.0040cab0
add esp, 0xc
test eax, eax
jne 0x40c483
push ebp
call fcn.0040d4a0
add esp, 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.0041b559
add esp, 0x70
ret
mov dword [eax], ebp
mov ebp, eax
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x20]
movzx edx, word [edi + 0x5a]
movzx ecx, word [esi]
mov eax, ecx
and ecx, 0xfffe
or eax, 1
movzx ecx, cx
test dx, dx
movzx eax, ax
cmovne ecx, eax
mov word [esi], cx
cmp dword [edi + 0x34], 0
ja 0x40c4ea
jb 0x40c4be
cmp dword [edi + 0x30], 0xffffffff
jae 0x40c4ea
cmp dword [edi + 0x2c], 0
ja 0x40c4ea
jb 0x40c4cc
cmp dword [edi + 0x28], 0xffffffff
jae 0x40c4ea
mov esi, dword [esp + 0x14]
test esi, 0x200
je 0x40c4e6
cmp dword [edi + 0x54], 0
ja 0x40c4ee
jb 0x40c4e6
cmp dword [edi + 0x50], 0xffffffff
jae 0x40c4ee
xor cl, cl
jmp 0x40c4f0
mov esi, dword [esp + 0x14]
mov cl, 1
mov eax, esi
mov byte [esp + 0x13], cl
and eax, 0x500
cmp eax, 0x500
je 0x40c50a
test cl, cl
jne 0x40c50a
xor al, al
jmp 0x40c50c
mov al, 1
mov ecx, 0x101
mov byte [esp + 0x12], al
cmp dx, cx
je 0x40c533
mov ecx, 0x102
cmp dx, cx
je 0x40c533
mov ecx, 0x103
mov byte [esp + 0x11], 0
cmp dx, cx
jne 0x40c538
mov byte [esp + 0x11], 1
test al, al
je 0x40c6c8
push 0
lea eax, [esp + 0x34]
push 0x1c
push eax
call fcn.0040aa80
mov esi, eax
add esp, 0xc
mov dword [esp + 0x28], esi
test esi, esi
jne 0x40c587
lea eax, [ebx + 8]
push 0
push 0xe
push eax
call fcn.00409090
push ebp
call fcn.0040d4a0
add esp, 0x10
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.0041b559
add esp, 0x70
ret
mov eax, dword [esp + 0x14]
mov ecx, eax
and ecx, 0x100
and eax, 0x400
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x40c5de
test eax, eax
jne 0x40c5c1
cmp dword [edi + 0x2c], eax
ja 0x40c5c1
jb 0x40c5b1
cmp dword [edi + 0x28], 0xffffffff
ja 0x40c5c1
cmp dword [edi + 0x34], 0
ja 0x40c5c1
cmp dword [edi + 0x30], 0xffffffff
jbe 0x40c657
push dword [edi + 0x34]
push dword [edi + 0x30]
push esi
call fcn.0040ad10
push dword [edi + 0x2c]
push dword [edi + 0x28]
push esi
call fcn.0040ad10
add esp, 0x18
jmp 0x40c657
test eax, eax
jne 0x40c609
cmp dword [edi + 0x2c], eax
ja 0x40c609
jb 0x40c5ef
cmp dword [edi + 0x28], 0xffffffff
ja 0x40c609
cmp dword [edi + 0x34], 0
ja 0x40c609
jb 0x40c5fd
cmp dword [edi + 0x30], 0xffffffff
ja 0x40c609
cmp dword [edi + 0x54], 0
ja 0x40c609
cmp dword [edi + 0x50], 0xffffffff
jbe 0x40c657
mov ecx, dword [edi + 0x34]
mov eax, dword [edi + 0x30]
test ecx, ecx
jne 0x40c618
cmp eax, 0xffffffff
jb 0x40c623
push ecx
push eax
push esi
call fcn.0040ad10
add esp, 0xc
mov ecx, dword [edi + 0x2c]
mov eax, dword [edi + 0x28]
test ecx, ecx
jne 0x40c632
cmp eax, 0xffffffff
jb 0x40c63d
push ecx
push eax
push esi
call fcn.0040ad10
add esp, 0xc
mov ecx, dword [edi + 0x54]
mov eax, dword [edi + 0x50]
test ecx, ecx
jne 0x40c64c
cmp eax, 0xffffffff
jb 0x40c657
push ecx
push eax
push esi
call fcn.0040ad10
add esp, 0xc
push esi
call fcn.0040abf0
add esp, 4
test al, al
jne 0x40c696
push 0
lea eax, [ebx + 8]
push 0x14
push eax
call fcn.00409090
push esi
call fcn.0040a7e0
push ebp
call fcn.0040d4a0
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.0041b559
add esp, 0x70
ret
push 0x300
lea eax, [esp + 0x34]
push eax
push esi
call fcn.0040abc0
add esp, 4
movzx eax, ax
push eax
push 1
call fcn.0040d660
push dword [esp + 0x38]
mov esi, eax
call fcn.0040a7e0
mov dword [esi], ebp
add esp, 0x14
mov ebp, esi
jmp 0x40c6d3
mov eax, esi
and eax, 0x100
mov dword [esp + 0x18], eax
cmp byte [esp + 0x11], 0
je 0x40c783
push 0
lea eax, [esp + 0x2c]
push 7
push eax
call fcn.0040aa80
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x40c701
mov eax, dword [esp + 0x1c]
add eax, 8
jmp 0x40c55e
push 2
push ebx
call fcn.0040ac60
push 2
push 0x4423a0
push ebx
call fcn.0040ac00
movzx eax, byte [edi + 0x5a]
push eax
push ebx
call fcn.0040ada0
movzx eax, word [edi + 0x10]
push eax
push ebx
call fcn.0040ac60
push ebx
call fcn.0040abf0
add esp, 0x28
test al, al
jne 0x40c75e
mov eax, dword [esp + 0x1c]
push 0
add eax, 8
push 0x14
push eax
call fcn.00409090
push ebx
call fcn.0040a7e0
push ebp
call fcn.0040d4a0
add esp, 0x14
jmp 0x40c571
push 0x300
lea eax, [esp + 0x2c]
push eax
push 7
push 0x9901
call fcn.0040d660
push ebx
mov esi, eax
call fcn.0040a7e0
mov dword [esi], ebp
add esp, 0x14
mov ebp, esi
push 0
lea eax, [esp + 0x50]
push 0x2e
push eax
call fcn.0040aa80
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x40c6f5
mov esi, dword [esp + 0x18]
mov ecx, 0x442398
test esi, esi
mov eax, 0x442390
push 4
cmove eax, ecx
push eax
push ebx
call fcn.0040ac00
add esp, 0xc
test esi, esi
jne 0x40c7cf
movzx eax, word [edi + 8]
push eax
push ebx
call fcn.0040ac60
add esp, 8
movzx ecx, word [edi + 0xa]
xor eax, eax
cmp byte [esp + 0x13], al
mov edx, 0x2d
cmovne eax, edx
cmp eax, ecx
cmova ecx, eax
push ecx
push ebx
call fcn.0040ac60
mov eax, dword [esp + 0x28]
movzx eax, word [eax]
push eax
push ebx
call fcn.0040ac60
add esp, 0x10
mov eax, 0x63
cmp byte [esp + 0x11], 0
jne 0x40c80e
movzx eax, word [edi + 0x10]
push eax
push ebx
call fcn.0040ac60
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x1c]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x30], ecx
call fcn.00428b5d
mov edx, eax
add esp, 0xc
test edx, edx
jne 0x40c83b
lea esi, [eax + 0x21]
jmp 0x40c886
mov eax, dword [edx + 0x14]
movzx ecx, ax
cmp eax, 0x50
jge 0x40c852
mov dword [edx + 0x14], 0x50
mov ecx, 0x50
shl ecx, 4
mov eax, 0x301
add cx, word [edx + 0x10]
add cx, ax
mov eax, dword [edx]
shl cx, 5
add cx, word [edx + 0xc]
movzx esi, cx
mov cx, word [edx + 8]
shl cx, 6
add cx, word [edx + 4]
sar eax, 1
shl cx, 5
add cx, ax
movzx eax, cx
push eax
push ebx
call fcn.0040ac60
push esi
push ebx
call fcn.0040ac60
add esp, 0x10
cmp byte [esp + 0x11], 0
je 0x40c8b0
cmp dword [edi + 0x34], 0
ja 0x40c8b0
jb 0x40c8ac
cmp dword [edi + 0x30], 0x14
jae 0x40c8b0
xor eax, eax
jmp 0x40c8b3
mov eax, dword [edi + 0x20]
push eax
push ebx
call fcn.0040acb0
add esp, 8
cmp dword [esp + 0x18], 0
je 0x40c8eb
cmp dword [edi + 0x2c], 0
ja 0x40c8de
jb 0x40c8d2
cmp dword [edi + 0x28], 0xffffffff
jae 0x40c8de
cmp dword [edi + 0x34], 0
ja 0x40c8de
cmp dword [edi + 0x30], 0xffffffff
jb 0x40c8eb
push 0xffffffffffffffff
push ebx
call fcn.0040acb0
add esp, 8
jmp 0x40c918
cmp dword [edi + 0x2c], 0
mov eax, dword [edi + 0x28]
ja 0x40c8fb
jb 0x40c8fe
cmp eax, 0xffffffff
jb 0x40c8fe
or eax, 0xffffffff
push eax
push ebx
call fcn.0040acb0
mov eax, dword [edi + 0x30]
add esp, 8
cmp dword [edi + 0x34], 0
ja 0x40c918
jb 0x40c91b
cmp eax, 0xffffffff
jb 0x40c91b
or eax, 0xffffffff
push eax
push ebx
call fcn.0040acb0
push dword [edi + 0x38]
call fcn.0040f4b0
movzx eax, ax
push eax
push ebx
call fcn.0040ac60
push dword [esp + 0x28]
push dword [edi + 0x3c]
call fcn.0040da30
push 0x300
push ebp
movzx esi, ax
call fcn.0040da30
add eax, esi
push eax
push ebx
call fcn.0040ac60
add esp, 0x2c
cmp dword [esp + 0x18], 0
jne 0x40c9b3
push dword [edi + 0x40]
call fcn.0040f4b0
movzx eax, ax
push eax
push ebx
call fcn.0040ac60
movzx eax, word [edi + 0x44]
push eax
push ebx
call fcn.0040ac60
movzx eax, word [edi + 0x48]
push eax
push ebx
call fcn.0040ac60
push dword [edi + 0x4c]
push ebx
call fcn.0040acb0
mov eax, dword [edi + 0x50]
add esp, 0x24
cmp dword [edi + 0x54], 0
ja 0x40c9a8
jb 0x40c9a5
cmp eax, 0xffffffff
jae 0x40c9a8
push eax
jmp 0x40c9aa
push 0xffffffffffffffff
push ebx
call fcn.0040acb0
add esp, 8
push ebx
call fcn.0040abf0
add esp, 4
test al, al
je 0x40c739
push ebx
call fcn.0040abc0
mov esi, dword [esp + 0x20]
push edx
push eax
lea eax, [esp + 0x58]
push eax
push esi
call fcn.0040d440
add esp, 0x14
push ebx
test eax, eax
jns 0x40c9f6
call fcn.0040a7e0
push ebp
call fcn.0040d4a0
add esp, 8
jmp 0x40c571
call fcn.0040a7e0
mov eax, dword [edi + 0x38]
add esp, 4
test eax, eax
je 0x40ca17
push eax
push esi
call fcn.0040f5d0
add esp, 8
test eax, eax
js 0x40c464
test ebp, ebp
je 0x40ca32
push 0x300
push ebp
push esi
call fcn.0040da80
add esp, 0xc
test eax, eax
js 0x40c464
push ebp
call fcn.0040d4a0
mov eax, dword [edi + 0x3c]
add esp, 4
test eax, eax
je 0x40ca58
push dword [esp + 0x14]
push eax
push esi
call fcn.0040da80
add esp, 0xc
test eax, eax
js 0x40c46d
cmp dword [esp + 0x18], 0
jne 0x40ca92
mov eax, dword [edi + 0x40]
test eax, eax
je 0x40ca92
push eax
push esi
call fcn.0040f5d0
movzx ecx, byte [esp + 0x1a]
add esp, 8
or edx, 0xffffffff
test eax, eax
cmovs ecx, edx
pop edi
pop esi
pop ebp
mov eax, ecx
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.0041b559
add esp, 0x70
ret
mov ecx, dword [esp + 0x7c]
movzx eax, byte [esp + 0x12]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041b559
add esp, 0x70
ret