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

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, dword [esp + 0x34]
push edi
mov eax, dword [esi + 0x167a2]
test eax, eax
mov eax, dword [esi + 0x1679a]
je 0x40c41c
mov ecx, dword [esi + 0x16796]
mov dword [esi + 0x1679a], 0
add ecx, eax
pop edi
mov dword [esi + 0x16796], ecx
mov ecx, dword [esi + 0x15f8a]
mov dword [esi + 0x15f8e], ecx
pop esi
pop ebp
mov eax, 0x32
pop ebx
add esp, 0x24
ret
test eax, eax
je 0x40cde8
cdq
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x44]
test eax, eax
mov dword [esp + 0x28], edx
jne 0x40c477
mov eax, dword [esi + 0x4c]
test eax, eax
jne 0x40c477
mov ebx, dword [esi + 0x3d24]
mov eax, dword [esp + 0x24]
mov ebp, dword [esi + 0x3d28]
mov ecx, dword [esi + 0x453c]
mov edi, ebx
mov edx, dword [esi + 0x4538]
add edi, eax
mov eax, ebp
adc eax, dword [esp + 0x28]
cmp eax, ecx
jl 0x40c477
jg 0x40c46b
cmp edi, edx
jbe 0x40c477
sub edx, ebx
sbb ecx, ebp
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0x28]
test eax, eax
jg 0x40c4ca
jl 0x40c489
mov ebp, dword [esp + 0x24]
test ebp, ebp
ja 0x40c4ce
mov eax, dword [esi + 0x44]
test eax, eax
jne 0x40c4a2
mov dword [esi], 1
mov dword [esi + 0x20], 1
jmp 0x40cc4d
mov eax, dword [esi + 0x4c]
mov dword [esi], 1
test eax, eax
je 0x40c4bb
mov dword [esi + 0x20], 1
jmp 0x40cc4d
mov dword [esi + 0x167a2], 2
jmp 0x40cc4d
mov ebp, dword [esp + 0x24]
mov edx, dword [esi + 0x15f8a]
push esi
push ebp
push edx
call fcn.0040d4c0
mov eax, dword [esi + 0x3d18]
add esp, 0xc
test eax, eax
jne 0x40c64a
mov eax, dword [esi + 0x44]
test eax, eax
jne 0x40c655
mov eax, dword [esi + 0x4c]
test eax, eax
jne 0x40c64a
cmp dword [esi + 0x45a4], 0x4000
jne 0x40c5d7
mov eax, dword [esp + 0x24]
mov edi, dword [esi + 0x15f92]
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x2c], eax
xor ebp, ebp
mov byte [esp + 0x38], 0xd
mov byte [esp + 0x39], 0xa
test ebp, ebp
jne 0x40cc4d
cmp byte [edi], 0xa
jne 0x40c583
mov edx, dword [esi + 0x84]
mov eax, dword [esi + 0x1679e]
add edx, 1
push ebp
mov dword [esi + 0x84], edx
mov ecx, dword [esi + 0x88]
adc ecx, ebp
lea edx, [esp + 0x3c]
mov dword [esi + 0x88], ecx
lea ecx, [esp + 0x14]
push ecx
push 2
push edx
push eax
call dword [0x500200]
test eax, eax
je 0x40c5a6
mov eax, dword [esp + 0x10]
test eax, eax
ja 0x40c5ab
jmp 0x40c5a6
mov edx, dword [esi + 0x1679e]
lea ecx, [esp + 0x10]
push 0
push ecx
push 1
push edi
push edx
call dword [0x500200]
test eax, eax
je 0x40c5a6
mov eax, dword [esp + 0x10]
test eax, eax
ja 0x40c5ab
mov ebp, 1
mov edx, dword [esp + 0x2c]
inc edi
add edx, 0xffffffff
adc ebx, 0xffffffff
mov dword [esp + 0x2c], edx
test ebx, ebx
jg 0x40c531
jl 0x40cc4d
mov eax, edx
test eax, eax
ja 0x40c531
jmp 0x40cc4d
mov ebx, dword [0x500200]
mov edi, 0x14
mov dword [esp + 0x10], 0
test edi, edi
jle 0x40c625
mov ecx, dword [esi + 0x15f92]
mov edx, dword [esi + 0x1679e]
lea eax, [esp + 0x10]
push 0
push eax
push ebp
push ecx
push edx
call ebx
test eax, eax
mov eax, dword [esp + 0x10]
je 0x40c61a
cmp eax, ebp
je 0x40cc4d
mov ebp, dword [esp + 0x24]
test eax, eax
jne 0x40c621
dec edi
jmp 0x40c5ea
xor edi, edi
jmp 0x40c5ea
mov eax, dword [esi + 0x3d0c]
test eax, eax
jne 0x40cc4d
mov dword [esi + 0x167a2], 2
pop edi
pop esi
pop ebp
mov eax, 0x32
pop ebx
add esp, 0x24
ret
mov eax, dword [esi + 0x44]
test eax, eax
je 0x40c8bb
mov eax, dword [esi + 0x48]
test eax, eax
jne 0x40c8bb
mov eax, dword [esi + 0x15f92]
mov edx, dword [esi + 0x78]
mov edi, dword [esi + 0x4538]
mov ecx, dword [esi + 0x88]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x7c]
mov ebp, dword [esi + 0x453c]
add edx, eax
mov eax, dword [esi + 0x84]
mov ebx, eax
add ebx, edi
mov edi, ecx
adc edi, ebp
mov ebp, dword [esi + 0x6c]
cmp edi, ebp
jg 0x40c6c2
jl 0x40c6a0
cmp ebx, dword [esi + 0x68]
jae 0x40c6c2
mov edi, dword [esi + 0x70]
mov ebp, dword [esi + 0x74]
mov ebx, dword [esi + 0x4538]
sub eax, edi
mov edi, dword [esi + 0x453c]
sbb ecx, ebp
add eax, ebx
adc ecx, edi
mov dword [esp + 0x2c], eax
mov ebx, ecx
jmp 0x40c6cb
mov ecx, dword [esi + 0x68]
mov ebx, ebp
mov dword [esp + 0x2c], ecx
mov edi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x30], ebx
mov ecx, dword [esi + 0x90]
mov eax, dword [esi + 0x8c]
cmp ecx, dword [esi + 0x74]
jl 0x40c823
jg 0x40c6f7
cmp eax, dword [esi + 0x70]
jb 0x40c823
mov eax, dword [esi + 0x80]
mov ecx, dword [esi + 0x7c]
cmp eax, dword [esi + 0x6c]
jg 0x40c8a0
jl 0x40c714
cmp ecx, dword [esi + 0x68]
jae 0x40c8a0
cmp dword [esi + 0x45a4], 0x4000
jne 0x40c7e1
cmp eax, ebx
jg 0x40c885
mov eax, dword [esp + 0x2c]
jl 0x40c73a
cmp ecx, eax
jae 0x40c885
cmp byte [edi], 0xa
jne 0x40c795
mov byte [edx], 0xd
mov ecx, dword [esi + 0x6c]
inc edx
cmp ebx, ecx
jg 0x40c77d
jl 0x40c751
cmp eax, dword [esi + 0x68]
jae 0x40c77d
mov ecx, dword [esi + 0x84]
add ecx, 1
mov dword [esi + 0x84], ecx
mov ecx, dword [esi + 0x88]
adc ecx, 0
add eax, 1
adc ebx, 0
mov dword [esi + 0x88], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebx
mov ecx, dword [esi + 0x7c]
add ecx, 1
mov dword [esi + 0x7c], ecx
mov ecx, dword [esi + 0x80]
adc ecx, 0
mov dword [esi + 0x80], ecx
mov ecx, dword [esi + 0x80]
cmp ecx, ebx
jg 0x40c885
jl 0x40c7b0
mov ecx, dword [esi + 0x7c]
cmp ecx, eax
jae 0x40c885
mov al, byte [edi]
mov byte [edx], al
mov ecx, dword [esi + 0x7c]
inc edx
inc edi
add ecx, 1
mov dword [esi + 0x7c], ecx
mov eax, dword [esi + 0x80]
mov ecx, dword [esp + 0x24]
adc eax, 0
add ecx, 0xffffffff
mov dword [esi + 0x80], eax
mov dword [esp + 0x24], ecx
adc ebp, 0xffffffff
jmp 0x40c866
cmp eax, ebx
jg 0x40c885
jl 0x40c7f5
cmp ecx, dword [esp + 0x2c]
jae 0x40c885
mov cl, byte [edi]
mov byte [edx], cl
mov ecx, dword [esi + 0x7c]
inc edx
inc edi
add ecx, 1
mov dword [esi + 0x7c], ecx
mov eax, dword [esi + 0x80]
mov ecx, dword [esp + 0x24]
adc eax, 0
add ecx, 0xffffffff
mov dword [esi + 0x80], eax
mov dword [esp + 0x24], ecx
adc ebp, 0xffffffff
jmp 0x40c866
add eax, 1
adc ecx, 0
mov dword [esi + 0x8c], eax
mov dword [esi + 0x90], ecx
mov ebx, dword [esi + 0x90]
mov ecx, dword [esi + 0x45be]
xor eax, eax
cmp ebx, eax
jg 0x40c885
jl 0x40c853
mov eax, dword [esi + 0x8c]
cmp eax, ecx
jae 0x40c885
mov ebx, dword [esp + 0x24]
add ebx, 0xffffffff
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x30]
adc ebp, 0xffffffff
inc edi
test ebp, ebp
jg 0x40c6d7
jl 0x40c87c
mov eax, dword [esp + 0x24]
test eax, eax
ja 0x40c6d7
mov dword [esp + 0x28], ebp
jmp 0x40cc4d
mov dword [esi + 0x167a2], 3
pop edi
mov dword [esp + 0x24], ebp
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x24
ret
mov dword [esi + 0x167a2], 2
pop edi
mov dword [esp + 0x24], ebp
pop esi
pop ebp
mov eax, 0x32
pop ebx
add esp, 0x24
ret
mov eax, dword [esi + 0x4c]
test eax, eax
jne 0x40c8d1
mov eax, dword [esi + 0x48]
test eax, eax
je 0x40cc4d
mov ebp, dword [esp + 0x24]
mov eax, dword [esi + 0x45a4]
mov dword [esp + 0x18], 3
cmp eax, 0x4000
mov edi, ebp
jne 0x40c965
lea ecx, [ebp + ebp]
push ecx
call fcn.004f3cf8
mov edx, eax
add esp, 4
test edx, edx
mov dword [esp + 0x38], edx
je 0x40c94e
xor ecx, ecx
test ebp, ebp
jle 0x40c946
mov ebx, dword [esi + 0x15f92]
cmp byte [ecx + ebx], 0xa
jne 0x40c934
mov byte [eax], 0xd
mov ebx, dword [esi + 0x84]
inc eax
add ebx, 1
mov dword [esi + 0x84], ebx
mov ebx, dword [esi + 0x88]
adc ebx, 0
inc edi
mov dword [esi + 0x88], ebx
mov ebx, dword [esi + 0x15f92]
inc eax
mov bl, byte [ecx + ebx]
inc ecx
mov byte [eax - 1], bl
cmp ecx, ebp
jl 0x40c905
mov ebp, edx
mov dword [esp + 0x1c], ebp
jmp 0x40c977
mov dword [esi + 0x167a2], 2
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x24
ret
mov ebp, dword [esi + 0x15f92]
mov dword [esp + 0x38], 0
mov dword [esp + 0x1c], ebp
mov eax, dword [esi + 0x48]
test eax, eax
je 0x40cbb7
mov eax, dword [esi + 0x84]
mov edx, dword [esi + 0x4538]
mov ecx, dword [esi + 0x88]
mov ebp, dword [esi + 0x453c]
mov ebx, eax
add ebx, edx
mov edx, ecx
adc edx, ebp
mov ebp, dword [esi + 0x6c]
cmp edx, ebp
jg 0x40c9d4
jl 0x40c9b0
cmp ebx, dword [esi + 0x68]
jae 0x40c9d4
mov edx, dword [esi + 0x70]
mov ebp, dword [esi + 0x74]
mov ebx, dword [esi + 0x4538]
sub eax, edx
mov edx, dword [esi + 0x453c]
sbb ecx, ebp
add eax, ebx
adc ecx, edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
jmp 0x40c9df
mov edx, dword [esi + 0x68]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], edx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x20], 0
test edi, edi
jbe case.0x40cc25.0
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x74]
mov ecx, dword [esi + 0x8c]
cmp eax, edx
jl 0x40cae8
jg 0x40ca15
cmp ecx, dword [esi + 0x70]
jb 0x40cae8
mov ebp, dword [esi + 0x80]
mov eax, dword [esi + 0x6c]
mov edx, dword [esi + 0x7c]
cmp ebp, eax
jg 0x40cb46
jl 0x40ca34
cmp edx, dword [esi + 0x68]
jae 0x40cb46
mov ecx, edi
xor eax, eax
add ecx, edx
mov edx, dword [esp + 0x30]
adc eax, ebp
cmp eax, edx
jl 0x40ca5d
jg 0x40ca4c
cmp ecx, dword [esp + 0x2c]
jbe 0x40ca5d
mov edi, dword [esp + 0x2c]
mov eax, dword [esi + 0x7c]
sub edi, eax
mov dword [esp + 0x18], 0
mov ecx, dword [esi + 0x4560]
mov edx, dword [esi + 0x64]
lea eax, [esp + 0x18]
mov dword [esp + 0x14], edi
push eax
mov eax, dword [esi + 0x60]
push ecx
mov ecx, 0x20
call fcn.004f44e0
mov edx, dword [esi + 0x60]
push eax
mov eax, dword [esi + 0x58]
push edx
mov edx, dword [esi + 0x5c]
mov ecx, 0x20
call fcn.004f44e0
push eax
mov eax, dword [esi + 0x58]
lea ecx, [esp + 0x28]
push eax
push ecx
push ebx
push 1
call dword [esi + 0x455c]
mov ecx, dword [esp + 0x14]
mov ebp, dword [esi + 0x7c]
mov eax, ecx
cdq
add ebp, eax
mov dword [esi + 0x7c], ebp
mov ebp, dword [esi + 0x80]
adc ebp, edx
cmp ecx, edi
mov dword [esi + 0x80], ebp
jae 0x40cacc
add ebx, ecx
sub edi, ecx
jmp 0x40cad4
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x18]
mov ecx, 3
cmp eax, ecx
ja case.0x40cae1.2
jmp dword [eax*4 + 0x40cdf4]
add ecx, 1
adc eax, 0
mov dword [esi + 0x8c], ecx
mov ecx, dword [esi + 0x45be]
mov dword [esi + 0x90], eax
mov edx, dword [esi + 0x90]
xor eax, eax
cmp edx, eax
jg 0x40cb7b
jl 0x40cb18
mov eax, dword [esi + 0x8c]
cmp eax, ecx
jae 0x40cb7b
dec edi
inc ebx
jmp 0x40c9eb
mov eax, dword [esp + 0x20]
test eax, eax
jne case.0x40cc25.0
jmp 0x40c9eb
mov dword [esi + 0x167a2], ecx
jmp 0x40cb85
mov dword [esi + 0x167a2], ecx
mov dword [esi], 1
jmp 0x40cb85
mov eax, dword [esi + 0x45a4]
mov dword [esi + 0x167a2], 2
cmp eax, 0x4000
jne 0x40cb6e
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40cb6e
push eax
call fcn.004f3d04
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x32
pop ebx
add esp, 0x24
ret
mov dword [esi + 0x167a2], 3
cmp dword [esi + 0x45a4], 0x4000
jne 0x40cd40
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40cd40
push eax
call fcn.004f3d04
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
xor ebx, ebx
test edi, edi
jbe case.0x40cc25.0
mov edx, dword [esi + 0x4560]
mov eax, dword [esi + 0x60]
lea ecx, [esp + 0x18]
mov dword [esp + 0x14], edi
push ecx
push edx
mov edx, dword [esi + 0x64]
mov ecx, 0x20
call fcn.004f44e0
mov edx, dword [esi + 0x5c]
push eax
mov eax, dword [esi + 0x60]
mov ecx, 0x20
push eax
mov eax, dword [esi + 0x58]
call fcn.004f44e0
mov ecx, dword [esi + 0x58]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
push ebp
push 1
call dword [esi + 0x455c]
mov eax, dword [esp + 0x14]
cmp eax, edi
jae 0x40cc13
add ebp, eax
sub edi, eax
jmp 0x40cc18
mov ebx, 1
mov eax, dword [esp + 0x18]
cmp eax, 3
ja case.default.0x40cc25
jmp dword [eax*4 + 0x40ce04]
test ebx, ebx
je 0x40cbb9
cmp dword [esi + 0x45a4], 0x4000
jne 0x40cc4d
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40cc4d
push eax
call fcn.004f3d04
add esp, 4
mov eax, dword [esi + 0x1679a]
mov ecx, dword [esi + 0x16796]
add ecx, eax
mov eax, dword [esi + 0x44]
mov dword [esi + 0x16796], ecx
mov ecx, dword [esi + 0x15f8a]
test eax, eax
mov dword [esi + 0x1679a], 0
mov dword [esi + 0x15f8e], ecx
je 0x40cd4d
mov edx, dword [esi + 0x7c]
mov eax, dword [esi + 0x80]
mov dword [esi + 0x3d24], edx
jmp 0x40cdcc
mov eax, dword [esi + 0x45a4]
mov dword [esi + 0x167a2], 3
cmp eax, 0x4000
jne 0x40cd40
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40cd40
push eax
call fcn.004f3d04
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [esi + 0x45a4]
mov dword [esi + 0x167a2], 3
cmp eax, 0x4000
mov dword [esi], 1
jne 0x40cd40
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40cd40
mov ecx, eax
push ecx
call fcn.004f3d04
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [esi + 0x45a4]
mov dword [esi + 0x167a2], 3
cmp eax, 0x4000
mov dword [esi], 1
jne 0x40cd40
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40cd40
mov edx, eax
push edx
call fcn.004f3d04
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x24
ret
mov eax, dword [esi + 0x4c]
test eax, eax
je 0x40cdae
mov eax, dword [esi + 0x48]
test eax, eax
je 0x40cd78
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x80]
mov dword [esi + 0x60], eax
mov dword [esi + 0x3d24], eax
mov dword [esi + 0x64], ecx
mov dword [esi + 0x3d28], ecx
jmp 0x40cdd2
mov eax, dword [esp + 0x24]
mov ebx, dword [esi + 0x3d24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esi + 0x60]
add ebx, eax
mov dword [esi + 0x3d24], ebx
mov edi, dword [esi + 0x3d28]
adc edi, ecx
add edx, eax
mov dword [esi + 0x60], edx
mov eax, dword [esi + 0x64]
adc eax, ecx
mov dword [esi + 0x3d28], edi
mov dword [esi + 0x64], eax
jmp 0x40cdd2
mov ecx, dword [esp + 0x24]
mov edx, dword [esi + 0x3d24]
add edx, ecx
mov dword [esi + 0x3d24], edx
mov edx, dword [esp + 0x28]
mov eax, dword [esi + 0x3d28]
adc eax, edx
mov dword [esi + 0x3d28], eax
mov eax, dword [esi + 0x3d28]
mov ecx, dword [esi + 0x3d24]
push eax
push ecx
call fcn.00407d10
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret