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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x416114]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x30]
push esi
mov esi, dword [ebp + 0xc]
push 0x2c
push 0
push eax
mov dword [ebp - 0x58], esi
call fcn.00413c50
mov cl, byte [ebx + 2]
add esp, 0xc
and dword [ebp - 0x44], 0
and dword [ebp - 0x40], 0
mov byte [ebp - 0x32], cl
cmp cl, 0x28
jne 0x40cd55
mov eax, dword [ebx + 0x54]
jmp 0x40cd58
mov eax, dword [ebx + 0x28]
mov eax, dword [eax]
mov dword [ebp - 0x54], eax
push edi
cmp cl, 0x28
jne 0x40ce0a
xor eax, eax
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x31], al
cmp dword [ebx + 0x14], eax
jne 0x40ce10
mov edi, dword [ebx + 0x38]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], edi
test edi, edi
je 0x40ce10
lea edi, [ebx + 0x5c]
mov ecx, dword [edi]
cmp ecx, 0x60
jb 0x40cdbf
mov edx, dword [ebx + 0x10]
cmp ecx, edx
jae 0x40cdbf
mov eax, dword [ecx + ebx]
sub eax, 0x40
je 0x40cdef
sub eax, 1
je 0x40cdd3
sub eax, 1
jne 0x40cdb3
lea eax, [ecx + 0x20]
cmp eax, edx
jbe 0x40cdf4
mov eax, dword [ebp - 0x38]
cmp byte [ebp - 0x31], 0
jne 0x40ce05
mov eax, dword [ebp - 0x48]
inc eax
add edi, 4
mov dword [ebp - 0x48], eax
cmp eax, dword [ebp - 0x4c]
jb 0x40cd8c
mov cl, byte [ebp - 0x32]
mov eax, dword [ebp - 0x38]
jmp 0x40ce10
lea eax, [ecx + 0x34]
cmp eax, edx
ja 0x40cdb3
cmp byte [ecx + ebx + 0xa], 0
mov byte [ebp - 0x31], 1
jbe 0x40cdcb
lea eax, [ebx + 0x14]
add eax, ecx
mov dword [ebp - 0x38], eax
jmp 0x40cdb6
lea eax, [ecx + 0x24]
jmp 0x40cdd6
cmp dword [ecx + ebx + 0xc], 0
jbe 0x40cdcb
lea eax, [ebx + 0x1c]
add eax, ecx
mov cl, byte [ebp - 0x32]
jmp 0x40ce0d
mov cl, byte [ebp - 0x32]
jmp 0x40ce10
lea eax, [ebx + 0x30]
mov dword [ebp - 0x38], eax
cmp cl, 0x28
jne 0x40ceb8
xor ecx, ecx
xor edx, edx
mov byte [ebp - 0x31], cl
cmp dword [ebx + 0x14], ecx
jne 0x40cebb
mov dword [ebp - 0x50], ecx
mov ecx, dword [ebx + 0x38]
mov dword [ebp - 0x48], ecx
test ecx, ecx
je 0x40cebb
lea eax, [ebx + 0x5c]
mov edi, ecx
mov dword [ebp - 0x4c], eax
mov ecx, dword [eax]
cmp ecx, 0x60
jb 0x40cea2
mov edi, dword [ebx + 0x10]
cmp ecx, edi
jae 0x40ce9f
mov eax, dword [ecx + ebx]
sub eax, 0x40
je 0x40ce7f
sub eax, 1
je 0x40ce7a
sub eax, 1
jne 0x40ce96
lea eax, [ecx + 0x20]
cmp eax, edi
ja 0x40ce96
cmp dword [ecx + ebx + 0xc], 0
mov eax, dword [ebp - 0x38]
jbe 0x40cebb
lea edx, [ebx + 0x1c]
add edx, ecx
jmp 0x40cebb
lea eax, [ecx + 0x34]
jmp 0x40ce82
lea eax, [ecx + 0x24]
cmp eax, edi
ja 0x40ce96
cmp byte [ecx + ebx + 0xa], 0
mov byte [ebp - 0x31], 1
jbe 0x40ceb3
lea edx, [ebx + 0x14]
add edx, ecx
cmp byte [ebp - 0x31], 0
jne 0x40ceb3
mov eax, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x50]
add eax, 4
inc ecx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x50], ecx
cmp ecx, edi
jb 0x40ce42
mov eax, dword [ebp - 0x38]
jmp 0x40cebb
lea edx, [ebx + 0x30]
movzx ecx, byte [eax + 3]
movzx eax, byte [edx + 4]
shl cx, 8
or cx, ax
movzx edi, cx
mov dword [ebp - 0x4c], edi
test di, di
je 0x40d02c
mov eax, dword [esi + 0x70]
xor edx, edx
or eax, dword [esi + 0x74]
mov word [ebp - 0x30], 0x8000
mov byte [ebp - 0x2e], dl
jne 0x40cf95
mov eax, dword [esi + 0x68]
or eax, dword [esi + 0x6c]
jne 0x40cf95
mov eax, dword [esi + 0x78]
or eax, dword [esi + 0x7c]
je 0x40cf53
mov al, byte [esi + 0x78]
mov byte [ebp - 0x3d], al
mov al, byte [esi + 0x79]
mov byte [ebp - 0x3e], al
mov al, byte [esi + 0x7a]
mov byte [ebp - 0x3f], al
mov al, byte [esi + 0x7b]
mov byte [ebp - 0x40], al
mov al, byte [esi + 0x7c]
mov byte [ebp - 0x41], al
mov al, byte [esi + 0x7d]
push 1
mov byte [ebp - 0x42], al
mov al, byte [esi + 0x7e]
push 1
push 0x10
push dword [ebp - 0x40]
mov byte [ebp - 0x43], al
mov al, byte [esi + 0x7f]
mov byte [ebp - 0x44], al
lea eax, [ebp - 0x2c]
push dword [ebp - 0x44]
push eax
call fcn.00404a52
mov al, 0x14
mov byte [ebp - 0x2d], al
jmp 0x40d02f
mov eax, dword [ebp - 0x58]
lea edi, [ebp - 0x2c]
mov esi, dword [ebp - 0x54]
push 5
pop ecx
mov eax, dword [eax + 0x1000]
add esi, 0x28c
push edx
push edx
push 8
push eax
push edx
lea eax, [ebp - 0x17]
rep movsd dword es:[edi], dword [esi]
push eax
mov byte [ebp - 0x18], 0x5f
call fcn.00404a52
mov edi, dword [ebp - 0x4c]
movzx eax, ax
mov byte [ebp + eax - 0x17], 0x2e
mov al, 0x1e
mov byte [ebp - 0x2d], al
jmp 0x40d02f
mov al, byte [esi + 0x68]
mov byte [ebp - 0x3d], al
mov al, byte [esi + 0x69]
mov byte [ebp - 0x3e], al
mov al, byte [esi + 0x6a]
mov byte [ebp - 0x3f], al
mov al, byte [esi + 0x6b]
mov byte [ebp - 0x40], al
mov al, byte [esi + 0x6c]
mov byte [ebp - 0x41], al
mov al, byte [esi + 0x6d]
push edx
mov byte [ebp - 0x42], al
mov al, byte [esi + 0x6e]
push 1
push 0x10
push dword [ebp - 0x40]
mov byte [ebp - 0x43], al
mov al, byte [esi + 0x6f]
mov byte [ebp - 0x44], al
lea eax, [ebp - 0x2c]
push dword [ebp - 0x44]
push eax
call fcn.00404a52
movzx ecx, ax
mov al, byte [esi + 0x70]
mov byte [ebp - 0x3d], al
mov al, byte [esi + 0x71]
mov byte [ebp - 0x3e], al
mov al, byte [esi + 0x72]
mov byte [ebp - 0x3f], al
mov al, byte [esi + 0x73]
mov byte [ebp - 0x40], al
mov al, byte [esi + 0x74]
mov byte [ebp - 0x41], al
mov al, byte [esi + 0x75]
mov byte [ebp - 0x42], al
mov al, byte [esi + 0x76]
push 1
push 1
mov byte [ebp - 0x43], al
mov al, byte [esi + 0x77]
push 0x10
push dword [ebp - 0x40]
mov byte [ebp - 0x44], al
mov eax, ecx
push dword [ebp - 0x44]
lea ecx, [ebp - 0x2c]
add eax, ecx
push eax
call fcn.00404a52
mov al, 0x28
jmp 0x40cf4b
mov al, byte [ebp - 0x2d]
push 4
movzx eax, al
pop ecx
add ax, cx
movzx ecx, di
movzx eax, ax
cmp di, ax
jb 0x40d045
mov ecx, eax
cmp byte [ebx + 2], 0x28
pop edi
jne 0x40d051
mov eax, dword [ebx + 0x40]
jmp 0x40d054
mov eax, dword [ebx + 0x18]
movzx esi, cx
lea ecx, [ebp - 0x30]
push esi
push ecx
push eax
call fcn.00413910
add esp, 0xc
cmp byte [ebx + 2], 0x28
jne 0x40d070
mov dword [ebx + 0x3c], esi
jmp 0x40d073
mov dword [ebx + 0x10], esi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0041404a
mov esp, ebp
pop ebp
ret 8