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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x150
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x1c]
test esi, esi
jne 0x4be347
test edi, edi
jne 0x4be5e7
mov ebx, dword [ebp + 0xc]
lea ecx, [ebx - 1]
cmp ecx, 0x3f
ja 0x4be5e7
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x4be5e7
test edx, edx
sete bl
test eax, eax
setne cl
test bl, cl
jne 0x4be5e7
cmp eax, 0x40
ja 0x4be5e7
test eax, eax
jne 0x4be5c0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
lea eax, [esp + 0x60]
mov dword [esp], eax
mov dword [esp + 0x1c], eax
call fcn.004bda00
test eax, eax
js 0x4be5e7
test edi, edi
je 0x4be3f8
test esi, esi
je 0x4be5e7
mov eax, dword [esp + 0xb4]
or eax, dword [esp + 0xb0]
jne 0x4be5e7
mov edx, dword [esp + 0x140]
mov eax, dword [esp + 0x1c]
lea ecx, [edi + edx]
lea eax, [eax + edx + 0x60]
cmp ecx, 0x80
ja 0x4be600
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_putchar
add dword [esp + 0x140], edi
lea ebx, [esp + 0x20]
xor eax, eax
mov ecx, 0x10
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x144]
cmp dword [ebp + 0xc], eax
jb 0x4be5e7
mov eax, dword [esp + 0xb4]
or eax, dword [esp + 0xb0]
jne 0x4be5e7
mov ecx, dword [esp + 0x140]
xor edx, edx
mov edi, edx
mov esi, ecx
add esi, dword [esp + 0xa0]
adc edi, dword [esp + 0xa4]
mov dword [esp + 0x10], esi
mov esi, 1
mov dword [esp + 0x14], edi
xor edi, edi
cmp edx, dword [esp + 0x14]
ja 0x4be470
jb 0x4be5f4
cmp ecx, dword [esp + 0x10]
jbe 0x4be5f4
nop
lea esi, [esi]
add esi, dword [esp + 0xa8]
movq xmm0, qword [esp + 0x10]
adc edi, dword [esp + 0xac]
cmp byte [esp + 0x148], 0
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
movhps xmm0, qword [esp + 0x10]
movaps xmmword [esp + 0xa0], xmm0
je 0x4be4b9
mov dword [esp + 0xb8], 0xffffffff
mov dword [esp + 0xbc], 0xffffffff
mov edi, dword [esp + 0x1c]
mov eax, 0x80
mov dword [esp + 4], 0
sub eax, ecx
mov dword [esp + 0xb0], 0xffffffff
mov dword [esp + 0xb4], 0xffffffff
mov dword [esp + 8], eax
lea edx, [edi + ecx + 0x60]
mov dword [esp], edx
call sub.msvcrt.dll_putwc
lea edx, [esp + 0xc0]
mov eax, edi
call fcn.004bc870
mov eax, dword [esp + 0x60]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x144]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_putchar
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [esp + 0x60]
mov dword [esp], eax
mov dword [esp + 0x1c], eax
call fcn.004bdbe0
test eax, eax
jns 0x4be3a3
lea esp, [ebp - 0xc]
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
xor esi, esi
xor edi, edi
jmp 0x4be470
mov ebx, 0x80
mov dword [esp + 4], esi
mov dword [esp], eax
sub ebx, edx
mov dword [esp + 8], ebx
mov dword [esp + 0x10], ebx
call sub.msvcrt.dll_putchar
mov eax, dword [esp + 0xa0]
mov edx, dword [esp + 0xa4]
mov ecx, 1
add eax, 0x80
adc edx, 0
xor ebx, ebx
mov dword [esp + 0xa0], eax
cmp edx, 0
mov dword [esp + 0xa4], edx
ja 0x4be730
cmp eax, 0x7f
ja 0x4be730
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0xc0]
add dword [esp + 0xa8], ecx
adc dword [esp + 0xac], ebx
call fcn.004bc870
mov eax, dword [esp + 0x10]
mov dword [esp + 0x140], 0
sub edi, eax
add esi, eax
cmp edi, 0x80
jbe 0x4be740
lea eax, [edi - 0x81]
mov dword [ebp + 0x14], edi
shr eax, 7
mov dword [esp + 0x10], eax
add eax, 1
shl eax, 7
add eax, esi
mov edi, eax
nop
mov eax, dword [esp + 0xa0]
mov edx, dword [esp + 0xa4]
mov ecx, 1
add eax, 0x80
adc edx, 0
xor ebx, ebx
mov dword [esp + 0xa0], eax
cmp edx, 0
mov dword [esp + 0xa4], edx
ja 0x4be6e5
cmp eax, 0x7f
jbe 0x4be6e9
xor ecx, ecx
xor ebx, ebx
mov eax, dword [esp + 0x1c]
add dword [esp + 0xa8], ecx
mov edx, esi
adc dword [esp + 0xac], ebx
sub esi, 0xffffff80
call fcn.004bc870
cmp esi, edi
jne 0x4be6b0
mov eax, dword [esp + 0x10]
mov edi, dword [ebp + 0x14]
mov ebx, dword [esp + 0x1c]
shl eax, 7
neg eax
lea edi, [edi + eax - 0x80]
mov eax, dword [esp + 0x140]
lea eax, [ebx + eax + 0x60]
jmp 0x4be3e1
xor ecx, ecx
xor ebx, ebx
jmp 0x4be658
lea eax, [esp + 0xc0]
jmp 0x4be3e1