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

Disassembly:
push ebp
mov ecx, 0xa
push edi
mov edi, str._DISCARD_
push esi
push ebx
sub esp, 0x2c
mov eax, dword [0x514850]
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x4c]
mov ebp, dword [ebx + 0x14]
mov esi, dword [eax + 0x18]
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb cl
mov esi, edx
mov edx, 1
mov eax, esi
cmp al, cl
je 0x40cc35
mov edx, ebp
shr edx, 0xf
and edx, 1
test byte [0x514821], 8
je 0x40cc46
test ebp, 0x2000
jne 0x40cc87
test edx, edx
jne 0x40cc87
mov esi, dword [esp + 0x48]
test esi, esi
je 0x40cc78
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x48]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x180]
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], 0x514820
call eax
test eax, eax
je 0x40cc7f
mov ecx, dword [ebx + 0x3c]
test ecx, ecx
je 0x40cc97
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [ebx + 0x3c]
test edi, edi
jne 0x40cc7f
mov dword [ebx + 0x3c], str.ABS
jmp 0x40cc7f
movzx eax, byte [0x514820]
mov esi, ebp
and ebp, 0xfff1fdfb
and esi, 0xfffffdff
and eax, 3
cmp al, 2
mov eax, dword [esp + 0x4c]
cmovne esi, ebp
mov eax, dword [eax + 0x50]
cmp eax, 2
je 0x40ce00
mov edx, esi
and edx, 0xfffffffe
cmp eax, 3
cmove esi, edx
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x40ce67
movzx ecx, byte [eax + 0x18]
mov edx, esi
or edx, 0xfffffff7
and edx, dword [eax + 0x14]
test cl, 4
mov dword [eax + 0x14], edx
jne 0x40cdc6
or edx, esi
or ecx, 4
mov edi, dword [ebx + 0x94]
mov dword [eax + 0x14], edx
mov edx, dword [0x514850]
mov byte [eax + 0x18], cl
mov ecx, dword [edx + 4]
mov ecx, dword [ecx + 0xb0]
mov dword [esp + 0x10], 0x514820
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], edi
call ecx
test esi, 0x800000
je 0x40cd44
mov eax, dword [esp + 0x4c]
mov edx, dword [ebx + 0x78]
mov eax, dword [eax + 0x1c]
mov dword [eax + 0x78], edx
and esi, 0x10000000
jne 0x40ce20
mov eax, dword [esp + 0x4c]
mov edx, dword [ebx + 0x40]
mov eax, dword [eax + 0x1c]
cmp edx, dword [eax + 0x40]
jbe 0x40cd62
mov dword [eax + 0x40], edx
mov edx, dword [0x50f344]
mov dword [ebx + 0x3c], eax
test edx, edx
jne 0x40cd99
mov edx, dword [eax + 0xa4]
mov dword [eax + 0xa4], ebx
mov dword [ebx + 0xa0], 0
test edx, edx
mov dword [ebx + 0xa4], edx
je 0x40ce5c
mov dword [edx + 0xa0], ebx
mov dword [esp], 0xc
call fcn.0040aaa0
mov edi, dword [esp + 0x40]
mov dword [eax + 4], 5
mov dword [eax], 0
mov edx, dword [edi + 4]
mov dword [edx], eax
mov dword [edi + 4], eax
mov dword [eax + 8], ebx
jmp 0x40cc7f
mov ecx, esi
mov edi, edx
and ecx, 0xfffffff7
xor edi, ecx
and edi, 0x1800000
jne 0x40cde7
test esi, 0x800000
je 0x40ce47
mov edi, dword [ebx + 0x78]
cmp dword [eax + 0x78], edi
je 0x40ce47
and esi, 0xfe7ffff7
and edx, 0xfe7fffff
or edx, esi
mov dword [eax + 0x14], edx
jmp 0x40cd44
mov eax, dword [0x514850]
mov eax, dword [eax + 4]
cmp dword [eax + 4], 5
je 0x40ce4b
and esi, 0xfffffffc
or esi, 0x200
jmp 0x40cccf
mov eax, dword [ebx + 0x94]
mov dword [esp], eax
call fcn.004536b0
cmp eax, 0x2d
jne 0x40cd50
mov eax, dword [esp + 0x4c]
mov dword [eax + 0x3c], pe_nt_image_headers32
jmp 0x40cd50
mov esi, ecx
jmp 0x40cdf3
and esi, 0xfffffefd
or esi, 0x200
jmp 0x40cccf
mov dword [eax + 0xa0], ebx
jmp 0x40cd99
mov eax, dword [esp + 0x4c]
mov edx, esi
call fcn.0040c390
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 0x1c]
jmp 0x40ccde