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

Disassembly:
sub esp, 0x7c
push ebx
push ebp
push esi
push edi
mov edi, eax
xor ebp, ebp
test edi, edi
mov dword [esp + 0x14], ebp
jne 0x40d7de
lea eax, [edi - 0x66]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
mov eax, dword [edi + 0x58]
add eax, dword [edi + 0x48]
mov ecx, dword [edi + 0x5c]
mov edx, dword [edi + 0x10]
adc ecx, dword [edi + 0x4c]
test edx, edx
mov esi, dword [edi + 0x30]
je 0x40d804
push 0
push ecx
push eax
mov eax, dword [edi + 0x1c]
push esi
push eax
call edx
add esp, 0x14
jmp 0x40d81d
xor edx, edx
cmp eax, eax
jne 0x40d821
cmp edx, ecx
jne 0x40d821
mov ecx, dword [edi + 0x1c]
push edx
mov edx, dword [edi + 0x28]
push eax
push esi
push ecx
call edx
add esp, 0x10
test eax, eax
je 0x40d826
or ebp, 0xffffffff
jmp 0x40d850
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x1c]
push eax
mov esi, edi
call fcn.0040c9f0
add esp, 4
test eax, eax
je 0x40d841
or ebp, 0xffffffff
jmp 0x40d850
cmp dword [esp + 0x1c], 0x2014b50
je 0x40d854
mov ebp, 0xffffff99
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x30]
push ecx
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40d86f
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x34]
push edx
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40d88a
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x38]
push eax
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40d8a5
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x3c]
push ecx
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40d8c0
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x40]
push edx
mov esi, edi
call fcn.0040c9f0
add esp, 4
test eax, eax
je 0x40d8dd
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x40]
push 0
push eax
lea edx, [esp + 0x78]
call fcn.0040d740
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x4c]
push ecx
call fcn.0040c9f0
add esp, 0xc
test eax, eax
je 0x40d908
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x18]
push edx
call fcn.0040c9f0
add esp, 4
test eax, eax
je 0x40d923
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x18]
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], 0
call fcn.0040c9f0
add esp, 4
test eax, eax
je 0x40d94e
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov edx, dword [esp + 0x18]
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x58]
push eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], 0
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40d979
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x5c]
push ecx
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40d994
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x60]
push edx
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40d9af
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x64]
push eax
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40d9ca
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x68]
push ecx
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40d9e5
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x6c]
push edx
call fcn.0040c9f0
add esp, 4
test eax, eax
je 0x40da00
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x18]
push eax
call fcn.0040c9f0
add esp, 4
test eax, eax
je 0x40da1b
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
test ebp, ebp
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x58]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], 0
mov eax, esi
jne 0x40da80
mov ecx, dword [esp + 0x98]
test ecx, ecx
je 0x40da80
mov eax, dword [esp + 0x9c]
cmp esi, eax
jae 0x40da53
mov byte [esi + ecx], 0
mov ebx, esi
jmp 0x40da55
mov ebx, eax
test esi, esi
jbe 0x40da7c
test eax, eax
jbe 0x40da7c
mov eax, dword [edi + 0x30]
mov edx, ecx
mov ecx, dword [edi + 0x1c]
push ebx
push edx
mov edx, dword [edi + 4]
push eax
push ecx
call edx
add esp, 0x10
cmp eax, ebx
je 0x40da7c
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
sub esi, ebx
mov eax, esi
mov ecx, dword [esp + 0x5c]
add eax, ecx
test ebp, ebp
mov dword [esp + 0x18], eax
jne 0x40dc99
test ecx, ecx
je 0x40dc05
sub eax, ecx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], eax
je 0x40daca
mov esi, dword [edi + 0x30]
cdq
push edx
push eax
lea edx, [ebp + 1]
mov eax, edi
call fcn.0040f960
add esp, 8
test eax, eax
jne 0x40dac3
mov dword [esp + 0x18], eax
jmp 0x40daca
or ebp, 0xffffffff
mov dword [esp + 0x14], ebp
cmp dword [esp + 0x5c], 0
jbe 0x40dbfd
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x20]
push eax
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40daec
or ebp, 0xffffffff
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x14]
push ecx
call fcn.0040c960
add esp, 4
test eax, eax
je 0x40db03
or ebp, 0xffffffff
cmp dword [esp + 0x20], 1
mov esi, dword [esp + 0x14]
jne 0x40dba6
cmp dword [esp + 0x50], 0xffffffff
jne 0x40db39
cmp dword [esp + 0x54], 0
jne 0x40db39
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x50]
push edx
mov eax, edi
call fcn.0040cb00
add esp, 4
test eax, eax
je 0x40db39
or ebp, 0xffffffff
cmp dword [esp + 0x48], 0xffffffff
jne 0x40db60
cmp dword [esp + 0x4c], 0
jne 0x40db60
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x48]
push eax
mov eax, edi
call fcn.0040cb00
add esp, 4
test eax, eax
je 0x40db60
or ebp, 0xffffffff
cmp dword [esp + 0x28], 0xffffffff
jne 0x40db87
cmp dword [esp + 0x2c], 0
jne 0x40db87
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x28]
push ecx
mov eax, edi
call fcn.0040cb00
add esp, 4
test eax, eax
je 0x40db87
or ebp, 0xffffffff
cmp dword [esp + 0x64], 0xffffffff
jne 0x40dbe3
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x24]
push edx
mov esi, edi
call fcn.0040c9f0
mov esi, dword [esp + 0x18]
add esp, 4
jmp 0x40dbdc
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x30]
xor edx, edx
test eax, eax
je 0x40dbc2
push 1
push edx
push esi
push ecx
mov ecx, dword [edi + 0x1c]
push ecx
call eax
add esp, 0x14
jmp 0x40dbdc
xor eax, eax
cmp esi, esi
jne 0x40dbe0
cmp eax, edx
jne 0x40dbe0
mov edx, dword [edi + 0x1c]
mov eax, dword [edi + 0x28]
push 1
push esi
push ecx
push edx
call eax
add esp, 0x10
test eax, eax
je 0x40dbe3
or ebp, 0xffffffff
mov ecx, dword [esp + 0x1c]
lea esi, [ecx + esi + 4]
cmp esi, dword [esp + 0x5c]
mov dword [esp + 0x1c], esi
jb 0x40dad5
mov dword [esp + 0x14], ebp
test ebp, ebp
jne 0x40dc99
cmp dword [esp + 0xa0], 0
je 0x40dcae
mov ebx, dword [esp + 0x60]
cmp ebx, dword [esp + 0xa4]
jae 0x40dc2f
mov edx, dword [esp + 0xa0]
mov byte [ebx + edx], 0
mov ebp, ebx
jmp 0x40dc36
mov ebp, dword [esp + 0xa4]
cmp dword [esp + 0x18], 0
je 0x40dc62
mov eax, dword [esp + 0x18]
mov esi, dword [edi + 0x30]
cdq
push edx
push eax
mov edx, 1
mov eax, edi
call fcn.0040f960
add esp, 8
test eax, eax
je 0x40dc62
mov dword [esp + 0x14], 0xffffffff
test ebx, ebx
jbe 0x40dca3
cmp dword [esp + 0xa4], 0
jbe 0x40dca3
mov eax, dword [esp + 0xa0]
mov ecx, dword [edi + 0x30]
mov edx, dword [edi + 0x1c]
push ebp
push eax
mov eax, dword [edi + 4]
push ecx
push edx
call eax
add esp, 0x10
cmp eax, ebp
je 0x40dca3
mov dword [esp + 0x14], 0xffffffff
mov ebp, dword [esp + 0x14]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
cmp dword [esp + 0x14], 0
jne 0x40dc95
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x90]
test edi, edi
mov eax, dword [esp + 0x94]
je 0x40dccb
mov ecx, 0x16
lea esi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
test eax, eax
je 0x40dc99
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
pop edi
pop esi
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, ebp
pop ebp
pop ebx
add esp, 0x7c
ret