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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
mov esi, edx
push edi
and dword [esi], 0
call fcn.0041341d
mov ecx, eax
test ecx, ecx
jns 0x4138a6
push 0xb
pop eax
jmp 0x413b97
mov ebx, dword [ecx*4 + 0x4e5d2c]
mov dword [esp + 0x14], ebx
test ebx, ebx
jne 0x4138b9
push 0xc
jmp 0x4138a0
mov al, byte [ebp + 8]
and al, 0xfe
mov dword [esi], ebx
cmp byte [ebx], 0
mov byte [ebp + 8], al
je 0x4138e3
mov dl, byte [0x4e5d00]
test dl, 1
jne 0x4138e3
test al, al
je 0x4138dc
test dl, 4
jne 0x413900
xor eax, eax
jmp 0x413b97
mov byte [ebx], 0
mov byte [ebx + 1], cl
call fcn.00410beb
test al, 1
je 0x4138f6
push 3
jmp 0x4138a0
cmp byte [ebp + 8], 0
je 0x413904
test al, 4
je 0x413904
push 0xa
jmp 0x4138a0
push 2
pop eax
lea esi, [ebx + 0xc]
mov cl, al
mov edx, esi
call fcn.00410da4
test eax, eax
jne 0x413b94
movzx ecx, word [esi]
mov edx, 0x600
lea eax, [ecx - 0x200]
cmp ax, dx
ja 0x413b94
lea eax, [ecx - 1]
test ecx, eax
jne 0x413b94
mov ecx, ebx
call fcn.0041370d
cmp eax, 4
je 0x413b94
push 2
pop ecx
cmp eax, ecx
jae 0x413e9e
mov edi, dword [ebx + 0x60]
xor edx, edx
inc edx
cmp eax, edx
jne 0x413bae
push 0xb
pop eax
cmp byte [ebx + eax + 0x68], 0
jne 0x413e9e
inc eax
cmp eax, 0x40
jb 0x413969
movzx ecx, byte [ebx + 0xd1]
movzx eax, byte [ebx + 0xd0]
shl cx, 8
or cx, ax
mov eax, pe_nt_image_headers32
cmp cx, ax
jne 0x413e9e
mov cl, byte [ebx + 0xd4]
movzx eax, word [esi]
shl edx, cl
cmp edx, eax
jne 0x413e9e
lea ecx, [ebx + 0xb0]
call fcn.00410e17
mov esi, dword [ebx + 0x64]
lea ecx, [ebx + 0xbc]
add eax, edi
mov dword [esp + 0x20], eax
adc edx, esi
mov dword [esp + 0x18], edx
call fcn.00410df8
mov dword [ebx + 0x34], eax
mov al, byte [ebx + 0xd6]
mov byte [ebx + 2], al
cmp al, 1
jne 0x413e9e
mov cl, byte [ebx + 0xd5]
xor edx, edx
lea eax, [edx + 1]
shl ax, cl
movzx ecx, ax
mov dword [esp + 0x1c], ecx
mov word [ebx + 0xa], ax
test cx, cx
je 0x413e9e
lea ecx, [ebx + 0xc4]
call fcn.00410df8
mov dword [esp + 0x10], eax
cmp eax, 0x7ffffffd
ja 0x413e9e
lea ecx, [eax + 2]
mov dword [ebx + 0x38], edi
mov dword [ebx + 0x30], ecx
lea ecx, [ebx + 0xc0]
mov dword [ebx + 0x3c], esi
call fcn.00410df8
mov ebx, eax
add ebx, edi
push 0
pop edi
adc edi, esi
mov esi, dword [esp + 0x14]
lea ecx, [esi + 0xb8]
mov dword [esi + 0x50], ebx
mov dword [esi + 0x54], edi
call fcn.00410df8
xor ecx, ecx
add eax, dword [esi + 0x60]
mov dword [esi + 0x40], eax
adc ecx, dword [esi + 0x64]
mov eax, dword [esp + 0x1c]
movzx eax, ax
cdq
mov dword [esi + 0x44], ecx
mov ecx, eax
mov eax, edx
mul dword [esp + 0x10]
mov esi, eax
mov eax, ecx
mul dword [esp + 0x10]
add esi, edx
add eax, ebx
adc esi, edi
cmp dword [esp + 0x18], esi
jb 0x413e9e
ja 0x413a9c
cmp dword [esp + 0x20], eax
jb 0x413e9e
mov ebx, dword [esp + 0x14]
lea ecx, [ebx + 0xc8]
call fcn.00410df8
and dword [ebx + 0x4c], 0
xor esi, esi
mov dword [ebx + 0x48], eax
xor edi, edi
test esi, esi
jne 0x413ae8
movzx eax, word [ebx + 0xa]
cmp edi, eax
jae 0x413e9e
mov edx, dword [ebx + 0x48]
mov ecx, ebx
call fcn.00411267
add eax, edi
mov ecx, ebx
adc edx, esi
push edx
push eax
call fcn.00411148
pop ecx
pop ecx
test eax, eax
jne 0x413b94
inc edi
cmp byte [esi + ebx + 0x68], 0x81
je 0x413afe
movzx ecx, word [ebx + 0xc]
lea eax, [esi + 0x20]
xor edx, edx
div ecx
mov esi, edx
jmp 0x413ab6
lea ecx, [ebx + 0x7c]
add ecx, esi
call fcn.00410df8
mov edi, eax
push 2
pop eax
cmp edi, eax
jb 0x413e9e
cmp edi, dword [ebx + 0x30]
jae 0x413e9e
movzx eax, word [ebx + 0xa]
xor ecx, ecx
cdq
mov esi, edi
push edx
add esi, 0xfffffffe
push eax
adc ecx, 0xffffffff
push ecx
push esi
call fcn.004be830
add eax, dword [ebx + 0x50]
movzx ecx, word [ebx + 0xc]
adc edx, dword [ebx + 0x54]
mov dword [ebx + 0x58], eax
mov eax, edi
mov dword [ebx + 0x5c], edx
xor edx, edx
shr ecx, 2
div ecx
jmp 0x413b7d
movzx esi, word [ebx + 0xc]
xor edx, edx
shr esi, 2
mov eax, edi
div esi
add edx, 0x1a
lea ecx, [ebx + edx*4]
call fcn.00410df8
cmp eax, 0xffffffff
je 0x413b9e
inc edi
cmp eax, edi
jne 0x413e9e
mov eax, edi
xor edx, edx
div esi
xor ecx, ecx
add eax, dword [ebx + 0x40]
adc ecx, dword [ebx + 0x44]
push ecx
push eax
mov ecx, ebx
call fcn.00411148
pop ecx
pop ecx
test eax, eax
je 0x413b51
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or dword [ebx + 0x1c], 0xffffffff
or dword [ebx + 0x18], 0xffffffff
push 4
pop edx
jmp 0x413e81
movzx ecx, byte [ebx + 0x74]
movzx eax, byte [ebx + 0x73]
movzx edx, word [esi]
shl cx, 8
or cx, ax
mov dword [esp + 0x1c], edx
cmp cx, dx
jne 0x413e9e
movzx ecx, byte [ebx + 0x7f]
movzx eax, byte [ebx + 0x7e]
shl ecx, 8
or ecx, eax
jne 0x413bed
lea ecx, [ebx + 0x8c]
call fcn.00410df8
mov edx, dword [esp + 0x1c]
mov ecx, eax
mov dword [ebx + 0x34], ecx
mov al, byte [ebx + 0x78]
mov byte [ebx + 2], al
cmp al, 1
je 0x413c02
cmp al, 2
jne 0x413e9e
movzx edi, al
imul edi, ecx
mov cl, byte [ebx + 0x75]
movzx eax, cl
mov word [ebx + 0xa], ax
test cl, cl
je 0x413e9e
movzx ecx, cl
mov dword [esp + 0x24], ecx
lea eax, [ecx - 1]
test ecx, eax
jne 0x413e9e
movzx ecx, byte [ebx + 0x7a]
movzx eax, byte [ebx + 0x79]
shl cx, 8
or cx, ax
movzx esi, dx
movzx eax, cx
mov dword [esp + 0x18], eax
movzx eax, cx
shr esi, 5
mov dword [esp + 0x20], eax
cdq
idiv esi
mov word [ebx + 8], cx
mov dword [esp + 0x10], esi
test edx, edx
jne 0x413e9e
movzx esi, byte [ebx + 0x7c]
movzx eax, byte [ebx + 0x7b]
shl esi, 8
or esi, eax
jne 0x413c7e
lea ecx, [ebx + 0x88]
call fcn.00410df8
mov esi, eax
movzx edx, byte [ebx + 0x77]
movzx ecx, byte [ebx + 0x76]
shl dx, 8
or dx, cx
movzx ecx, dx
test cx, cx
je 0x413e9e
mov eax, dword [esp + 0x20]
cdq
idiv dword [esp + 0x10]
mov dword [esp + 0x14], ecx
mov ecx, eax
add ecx, dword [esp + 0x14]
add ecx, edi
cmp esi, ecx
jb 0x413e9e
sub esi, ecx
xor edx, edx
mov eax, esi
div dword [esp + 0x24]
mov esi, eax
test esi, esi
je 0x413e9e
mov eax, 0xffffff5
cmp eax, esi
push 2
sbb eax, eax
and eax, 0xfffffffd
add eax, 3
cmp esi, 0xfff5
pop edx
cmovbe eax, edx
mov dword [esp + 0x10], eax
cmp esi, 0xff5
ja 0x413cfa
xor edx, edx
inc edx
mov dword [esp + 0x10], edx
jmp 0x413d02
test eax, eax
je 0x413e9e
mov edx, dword [ebx + 0x60]
add esi, 2
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x38], edx
mov edx, dword [ebx + 0x64]
mov dword [ebx + 0x3c], edx
cdq
add eax, dword [ebx + 0x60]
mov dword [esp + 0x24], eax
adc edx, dword [ebx + 0x64]
mov dword [ebx + 0x40], eax
xor eax, eax
add ecx, dword [ebx + 0x60]
mov dword [esp + 0x20], edx
adc eax, dword [ebx + 0x64]
mov dword [ebx + 0x44], edx
mov edx, dword [esp + 0x10]
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x50], ecx
mov dword [ebx + 0x54], eax
cmp edx, 3
jne 0x413d86
movzx ecx, byte [ebx + 0x93]
movzx eax, byte [ebx + 0x92]
shl cx, 8
or cx, ax
jne 0x413e9e
cmp word [esp + 0x18], cx
jne 0x413e9e
lea ecx, [ebx + 0x94]
call fcn.00410df8
and dword [ebx + 0x4c], 0
xor edi, edi
mov dword [ebx + 0x48], eax
mov eax, esi
shl eax, 2
inc edi
jmp 0x413dba
cmp word [esp + 0x18], 0
je 0x413e9e
xor eax, eax
add edi, dword [esp + 0x24]
mov dword [ebx + 0x48], edi
adc eax, dword [esp + 0x20]
xor edi, edi
push 2
mov dword [ebx + 0x4c], eax
inc edi
pop eax
cmp edx, eax
jne 0x413db1
lea eax, [esi + esi]
jmp 0x413dba
imul eax, esi, 3
and esi, edi
shr eax, 1
add eax, esi
mov edx, dword [esp + 0x1c]
dec eax
movzx ecx, dx
xor edx, edx
add eax, ecx
div ecx
cmp dword [ebx + 0x34], eax
jb 0x413e9e
or dword [ebx + 0x1c], 0xffffffff
or dword [ebx + 0x18], 0xffffffff
mov edx, dword [esp + 0x10]
mov byte [ebx + 4], 0x80
cmp edx, 3
jne 0x413e81
movzx ecx, byte [ebx + 0x99]
movzx eax, byte [ebx + 0x98]
shl cx, 8
or cx, ax
cmp cx, di
jne 0x413e81
mov eax, dword [ebx + 0x60]
mov ecx, dword [ebx + 0x64]
add eax, edi
adc ecx, 0
push ecx
push eax
mov ecx, ebx
call fcn.00411148
pop ecx
pop ecx
test eax, eax
jne 0x413e7d
mov byte [ebx + 4], al
movzx ecx, byte [ebx + 0x267]
movzx eax, byte [ebx + 0x266]
shl cx, 8
or cx, ax
mov eax, 0xaa55
cmp cx, ax
jne 0x413e7d
lea ecx, [ebx + 0x68]
call fcn.00410df8
cmp eax, 0x41615252
jne 0x413e7d
lea ecx, [ebx + 0x24c]
call fcn.00410df8
cmp eax, 0x61417272
jne 0x413e7d
lea ecx, [ebx + 0x250]
call fcn.00410df8
lea ecx, [ebx + 0x254]
mov dword [ebx + 0x1c], eax
call fcn.00410df8
mov dword [ebx + 0x18], eax
mov edx, dword [esp + 0x10]
mov ax, word [0x4e5d28]
inc ax
mov byte [ebx], dl
and dword [ebx + 0x20], 0
mov word [0x4e5d28], ax
mov word [ebx + 6], ax
jmp 0x4138dc
push 0xd
jmp 0x4138a0