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

Disassembly:
sub esp, 0x24
push ebx
push ebp
mov eax, edx
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebp
cmp eax, dword [esp + 0x38]
je 0x1004ee02
cmp dword [esp + 0x3c], 0
mov esi, dword [ebp + 8]
mov dword [esp + 0x18], 0
movzx eax, word [esi]
jne 0x1004eb66
movzx eax, word [eax*2 + 0x1009f7e0]
cdq
add dword [esi + 0x48], eax
adc dword [esi + 0x4c], edx
or bl, 0xff
movzx ecx, word [esi]
mov eax, dword [ebp]
mov byte [esp + 0x38], bl
mov ax, word [eax + ecx*2 + 0x2000]
mov word [esi], ax
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x40]
lea edi, [esi + 0x3c]
sub ecx, dword [edi]
mov eax, dword [esi + 0x48]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x4c]
mov dword [esp + 0x28], eax
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x1004eb58
mov eax, dword [esi + 0x50]
mov ebx, 1
mov dword [esp + 0x20], eax
xor esi, esi
mov dword [esp + 0x1c], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov eax, esi
shr eax, 5
lea edx, [ecx + eax*4]
mov ecx, esi
and ecx, 0x1f
mov eax, ebx
shl eax, cl
test dword [edx], eax
je 0x1004eab7
mov edi, dword [edi]
add edi, dword [esp + 0x1c]
jmp 0x1004eac2
mov eax, dword [edi]
mov edi, dword [esp + 0x1c]
add edi, 0x3c
add edi, eax
movzx eax, word [edi]
mov ecx, dword [esp + 0x20]
shl esi, 3
movzx eax, word [eax*2 + 0x1009f7e0]
cdq
add dword [ecx + esi], eax
adc dword [ecx + esi + 4], edx
movzx ecx, word [edi]
mov eax, dword [ebp]
mov ax, word [eax + ecx*2 + 0x2000]
mov word [edi], ax
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0x50]
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + esi]
mov ecx, dword [ecx + esi + 4]
cmp ecx, dword [esp + 0x28]
ja 0x1004eb1e
jb 0x1004eb0c
cmp eax, dword [esp + 0x24]
jae 0x1004eb1e
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], ecx
mov byte [esp + 0x38], al
jmp 0x1004eb22
mov eax, dword [esp + 0x18]
mov ecx, dword [edi + 0x40]
inc eax
sub ecx, dword [edi + 0x3c]
add edi, 0x3c
add dword [esp + 0x1c], 0x78
mov dword [esp + 0x18], eax
mov eax, 0x88888889
mov esi, dword [esp + 0x18]
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x1004ea95
mov bl, byte [esp + 0x38]
mov eax, dword [ebp + 8]
mov byte [eax + 0x6c], bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, 0x1000
mov byte [esp + 0x17], 0xff
sub ecx, eax
mov ebx, 1
movzx eax, word [ecx*2 + 0x1009f7e0]
cdq
add dword [esi + 0x48], eax
adc dword [esi + 0x4c], edx
movzx ecx, word [esi]
mov eax, dword [ebp]
mov ax, word [eax + ecx*2]
mov word [esi], ax
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x40]
lea edi, [esi + 0x3c]
sub ecx, dword [edi]
mov eax, dword [esi + 0x48]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x4c]
mov dword [esp + 0x20], eax
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x1004ec98
mov eax, dword [esi + 0x50]
xor esi, esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov eax, esi
shr eax, 5
lea edx, [ecx + eax*4]
mov ecx, esi
and ecx, 0x1f
mov eax, ebx
shl eax, cl
test dword [edx], eax
je 0x1004ebf8
mov edi, dword [edi]
add edi, dword [esp + 0x1c]
jmp 0x1004ec03
mov eax, dword [edi]
mov edi, dword [esp + 0x1c]
add edi, 0x3c
add edi, eax
movzx eax, word [edi]
mov ecx, 0x1000
sub ecx, eax
shl esi, 3
movzx eax, word [ecx*2 + 0x1009f7e0]
mov ecx, dword [esp + 0x28]
cdq
add dword [esi + ecx], eax
adc dword [esi + ecx + 4], edx
movzx ecx, word [edi]
mov eax, dword [ebp]
mov ax, word [eax + ecx*2]
mov word [edi], ax
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0x50]
mov dword [esp + 0x28], ecx
mov eax, dword [esi + ecx]
mov ecx, dword [esi + ecx + 4]
cmp ecx, dword [esp + 0x20]
ja 0x1004ec62
jb 0x1004ec50
cmp eax, dword [esp + 0x24]
jae 0x1004ec62
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x20], ecx
mov byte [esp + 0x17], al
jmp 0x1004ec66
mov eax, dword [esp + 0x18]
mov ecx, dword [edi + 0x40]
inc eax
sub ecx, dword [edi + 0x3c]
add edi, 0x3c
add dword [esp + 0x1c], 0x78
mov dword [esp + 0x18], eax
mov eax, 0x88888889
mov esi, dword [esp + 0x18]
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x1004ebd6
mov eax, dword [ebp + 8]
mov cl, byte [esp + 0x17]
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
mov byte [eax + 0x6c], cl
xor ecx, ecx
test edi, edi
setg cl
mov dword [esp + 0x28], ecx
test esi, esi
jle 0x1004ecd8
cmp dword [esp + 0x2c], 0
jge 0x1004ecd8
test ecx, ecx
mov ecx, ebp
setne al
movzx eax, al
push eax
push 0
push 1
call fcn.1004f380
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x1004ece0
mov ebp, ebx
jmp 0x1004ece7
mov ebp, dword [esp + 0x2c]
or esi, 0xffffffff
mov eax, edi
cdq
xor eax, edx
sub eax, edx
mov dword [esp + 0x1c], eax
jne 0x1004ecf8
xor edi, edi
jmp 0x1004ed01
bsr eax, eax
mov dword [esp + 0x38], eax
mov edi, eax
test ecx, ecx
je 0x1004ed0e
mov eax, ebp
cdq
mov ecx, eax
mov eax, esi
jmp 0x1004ed15
mov eax, esi
cdq
mov ecx, eax
mov eax, ebp
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
mov dword [esp + 0x20], ecx
sub eax, edx
mov dword [esp + 0x38], eax
test eax, eax
jne 0x1004ed2e
xor edx, edx
jmp 0x1004ed37
bsr eax, eax
mov dword [esp + 0x2c], eax
mov edx, eax
mov dword [esp + 0x24], edx
test ecx, ecx
jne 0x1004ed43
xor esi, esi
jmp 0x1004ed4c
bsr eax, ecx
mov dword [esp + 0x2c], eax
mov esi, eax
cmp esi, edx
jge 0x1004ed9b
mov eax, dword [esp + 0x28]
mov ebp, ebx
mov ebx, dword [esp + 0x30]
mov ecx, esi
rol ebp, cl
lea ecx, [eax + esi*2]
mov dword [esp + 0x2c], ecx
rol ebp, 1
cmp ebp, dword [esp + 0x38]
jg 0x1004ed96
cmp esi, edi
sete al
movzx eax, al
push eax
push ecx
push 2
mov ecx, ebx
call fcn.1004f380
cmp esi, edi
je 0x1004ed96
mov ecx, dword [esp + 0x2c]
inc esi
add ecx, 2
mov dword [esp + 0x2c], ecx
cmp esi, dword [esp + 0x24]
jl 0x1004ed65
mov ebx, 1
mov ebp, ebx
mov ecx, edi
shl ebp, cl
lea edx, [ebp - 1]
test edi, edi
jle 0x1004ee02
rol ebx, cl
lea ebx, [ebx]
ror ebx, 1
dec edi
mov eax, ebx
xor edx, ebx
or eax, ebp
mov dword [esp + 0x2c], edx
mov esi, 1
cmp eax, dword [esp + 0x38]
jle 0x1004edcc
xor esi, esi
jmp 0x1004edf8
mov eax, edx
or eax, ebp
cmp eax, dword [esp + 0x20]
jl 0x1004edf8
mov esi, dword [esp + 0x1c]
mov ecx, edi
sar esi, cl
mov ecx, dword [esp + 0x30]
and esi, 1
setne al
movzx eax, al
push eax
push edi
push 3
call fcn.1004f380
mov edx, dword [esp + 0x2c]
mov ecx, edi
shl esi, cl
or ebp, esi
test edi, edi
jg 0x1004edb0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret