Function at 0x4d8f40
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
mov eax, dword [0x7e4788]
xor eax, esp
mov dword [esp + 0x4c], eax
push ebx
mov ebx, dword [esp + 0x58]
push ebp
push esi
push edi
mov eax, dword [ebx + 0x40]
xor edi, edi
mov dword [esp + 0x24], ebx
mov ebp, 3
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], edi
movzx ecx, word [eax + 0x16]
movzx eax, word [eax + 0x78]
add ecx, 8
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x68]
mov esi, eax
and esi, 6
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edi
mov dword [esp + 0x18], esi
jne 0x4d8fab
test al, 8
jne 0x4d8fab
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.00529c8c
add esp, 0x50
ret
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4d8fc4
mov eax, dword [eax + 0x3c]
test eax, eax
je 0x4d8fc4
push 0
push eax
call fcn.004d8950
add esp, 8
mov ecx, dword [ebx + 0xc]
cmp ecx, ebp
jle 0x4d8fe2
mov edx, dword [ebx + 0x10]
cmp edx, 1
jle 0x4d8fe2
lea eax, [edx + 1]
cmp eax, ecx
jl 0x4d8fdf
lea edx, [ecx - 3]
jmp 0x4d8fe4
dec edx
jmp 0x4d8fe4
xor edx, edx
sub ecx, edx
mov dword [esp + 0x34], edx
cmp ecx, ebp
mov eax, 8
cmovge eax, edi
cmovl ebp, ecx
mov dword [esp + 0x2c], eax
test esi, esi
jne 0x4d9008
cmp ebp, 2
jl 0x4d9915
mov dword [esp + 0x14], edi
test ebp, ebp
jle 0x4d916f
mov eax, edx
mov esi, edx
not eax
mov dword [esp + 0x20], eax
nop
test esi, esi
js 0x4d9029
cmp esi, dword [ebx + 0xc]
jl 0x4d903f
push 0
push 0
push str.hb_cdxPageGetKeyPage:_wrong_iKey_index.
push 0x23f1
call fcn.0044a4a0
add esp, 0x10
test byte [ebx + 0x20], 2
je 0x4d905b
push 0
push 0
push str.hb_cdxPageGetKeyPage:_page_is_a_leaf.
push 0x23f1
call fcn.0044a4a0
add esp, 0x10
mov edx, dword [ebx + 0x40]
lea eax, [esi + 1]
movzx ecx, word [edx + 0x16]
add ecx, 8
imul ecx, eax
mov eax, dword [ecx + ebx + 0x54]
mov ecx, dword [ebx + 0x3c]
bswap eax
test ecx, ecx
je 0x4d9085
cmp dword [ecx], eax
jne 0x4d9085
mov dword [ebx + 0x3c], 0
jmp 0x4d9092
push eax
push ebx
push edx
call fcn.004daef0
add esp, 0xc
mov ecx, eax
mov edx, dword [esp + 0x14]
lea edi, [esp + 0x48]
lea eax, [edx*4]
add edi, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x1c]
mov dword [esp + eax + 0x48], ecx
test edx, edx
jle 0x4d912e
mov eax, dword [esp + eax + 0x44]
mov eax, dword [eax + 8]
mov dword [esp + 0x38], eax
cmp dword [ecx], eax
jne 0x4d90e0
mov eax, dword [ecx + 4]
lea ebx, [edx*4]
mov edi, dword [esp + ebx + 0x44]
mov ebx, dword [esp + 0x24]
cmp eax, dword [edi]
mov edi, dword [esp + 0x1c]
je 0x4d912e
push dword [ecx + 4]
mov eax, dword [esp + 0x24]
push edx
push dword [ecx]
add eax, esi
push edx
mov edx, dword [esp + 0x4c]
push dword [esp + 0x48]
push eax
mov ecx, dword [esp + edx + 0x5c]
push dword [ecx]
push eax
push str._r_nchilds__d___Page_lx__childs__d___Right_lx__childs__d___Page_lx__childs__d___Left_lx
call fcn.004278b0
push 1
call fcn.0052f970
push eax
call fcn.005377bd
push 0
push 0
push str.hb_cdxPageKeyIntBalance:_index_corrupted.
push 0x23f1
call fcn.0044a4a0
mov edx, dword [esp + 0x50]
add esp, 0x3c
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
add edi, ecx
cmp ecx, dword [esp + 0x10]
mov eax, ecx
mov dword [esp + 0x1c], edi
cmovle eax, dword [esp + 0x10]
cmp ecx, dword [esp + 0x28]
mov dword [esp + 0x10], eax
cmovge ecx, dword [esp + 0x28]
inc edx
inc esi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x14], edx
cmp edx, ebp
jl 0x4d9020
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], ecx
mov eax, dword [ebx + 0x40]
movzx ecx, word [eax + 0x78]
lea eax, [edi - 1]
add eax, ecx
mov dword [esp + 0x38], ecx
cdq
idiv ecx
mov ecx, dword [esp + 0x48]
mov esi, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], esi
cmp esi, 1
jne 0x4d91c8
cmp ebp, 1
jle 0x4d91c8
cmp dword [ecx + 4], 0xffffffff
mov edx, dword [esp + 0x38]
je 0x4d91cc
mov eax, dword [esp + ebp*4 + 0x44]
cmp dword [eax + 8], 0xffffffff
je 0x4d91cc
cmp edi, 6
jl 0x4d91cc
lea eax, [edx + edx*2]
sar eax, 1
cmp edi, eax
mov eax, 2
cmovg esi, eax
mov dword [esp + 0x20], esi
jmp 0x4d91cc
mov edx, dword [esp + 0x38]
mov eax, edx
shr eax, 1
sub dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
sub eax, dword [esp + 0x28]
inc eax
mov dword [esp + 0x28], eax
mov eax, ebp
mov ebx, dword [esp + 0x28]
sub eax, esi
cmp ebx, eax
cmovle ebx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x10], eax
test edi, edi
jle 0x4d9370
cmp dword [esp + 0x28], 2
jge 0x4d921c
cmp dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
je 0x4d9377
cmp ebp, 1
jne 0x4d927d
cmp edi, edx
jle 0x4d927d
mov eax, dword [ecx + 8]
cmp eax, 0xffffffff
je 0x4d927d
push eax
push ebx
push dword [ebx + 0x40]
call fcn.004daef0
mov dword [esp + 0x58], eax
mov ebp, 2
add esp, 0xc
add edi, dword [eax + 0xc]
mov eax, dword [ebx + 0x40]
mov dword [esp + 0x1c], edi
movzx ecx, word [eax + 0x78]
lea eax, [ecx - 1]
add eax, edi
cdq
idiv ecx
mov edx, dword [esp + 0x2c]
mov esi, eax
or edx, 1
mov eax, dword [esp + 0x34]
add eax, ebp
mov dword [esp + 0x20], esi
cmp eax, dword [ebx + 0xc]
cmovle edx, dword [esp + 0x2c]
mov dword [esp + 0x10], edx
jmp 0x4d936c
mov eax, edi
mov ecx, 2
cdq
idiv esi
cmp eax, ecx
cmovg ecx, eax
lea eax, [edi - 1]
add eax, esi
cdq
idiv esi
lea edx, [ebp - 1]
cmp eax, ecx
mov dword [esp + 0x30], edx
cmovle eax, ecx
cmp edx, 1
jle 0x4d92f1
mov ebx, edx
mov edx, dword [esp + ebx*4 + 0x48]
mov edx, dword [edx + 0xc]
cmp edx, ecx
jl 0x4d92e9
cmp edx, eax
jg 0x4d92e9
push 0
push dword [esp + ebx*4 + 0x4c]
sub edi, edx
call fcn.004d8950
mov eax, edi
add esp, 8
cdq
dec ebp
idiv esi
mov ecx, 2
cmp eax, ecx
cmovg ecx, eax
lea eax, [edi - 1]
add eax, esi
dec ebx
cdq
idiv esi
cmp eax, ecx
cmovle eax, ecx
cmp ebx, 1
jg 0x4d92a7
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x1c], edi
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x10], edx
cmp ebp, 2
jle 0x4d936c
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x10], edx
mov edx, dword [ebx + 0xc]
cmp edx, ecx
jl 0x4d9364
cmp edx, eax
jg 0x4d9364
sub edi, edx
push 0
push ebx
mov dword [esp + 0x24], edi
call fcn.004d8950
inc dword [esp + 0x3c]
dec ebp
add esp, 8
test ebp, ebp
jle 0x4d9343
mov ecx, ebp
lea esi, [esp + 0x4c]
lea edi, [esp + 0x48]
rep movsd dword es:[edi], dword [esi]
mov ebx, dword [esp + 0x48]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
mov eax, edi
mov ecx, 2
cdq
idiv esi
cmp eax, ecx
cmovg ecx, eax
lea eax, [edi - 1]
add eax, esi
cdq
idiv esi
cmp eax, ecx
cmovle eax, ecx
cmp ebp, 2
jg 0x4d9306
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x18], 0
jne 0x4d93ba
cmp ebp, 2
jl 0x4d9383
cmp dword [esp + 0x28], 2
jge 0x4d93ba
xor esi, esi
test ebp, ebp
jle 0x4d9915
nop dword [eax]
push 0
push dword [esp + esi*4 + 0x4c]
call fcn.004d8950
inc esi
add esp, 8
cmp esi, ebp
jl 0x4d9390
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.00529c8c
add esp, 0x50
ret
test edi, edi
jle 0x4d941b
mov eax, edi
imul eax, dword [esp + 0x40]
push eax
call fcn.0047f870
add esp, 4
mov dword [esp + 0x44], eax
xor edi, edi
mov dword [esp + 0x30], eax
test ebp, ebp
jle 0x4d9417
mov esi, dword [esp + 0x40]
mov ebx, eax
mov ecx, dword [esp + edi*4 + 0x48]
mov eax, dword [ecx + 0xc]
test eax, eax
jle 0x4d940a
imul eax, esi
push eax
lea eax, [ecx + 0x58]
push eax
push ebx
call fcn.0052ae60
mov eax, dword [esp + edi*4 + 0x54]
add esp, 0xc
mov eax, dword [eax + 0xc]
imul eax, esi
add ebx, eax
inc edi
cmp edi, ebp
jl 0x4d93e2
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
cmp esi, ebp
jle 0x4d9622
cmp ebp, 2
jge 0x4d942e
mov dword [esp + 0x20], ebp
jmp 0x4d943d
lea eax, [ebp - 1]
mov dword [esp + 0x20], eax
mov eax, dword [esp + eax*4 + 0x48]
mov dword [esp + ebp*4 + 0x48], eax
mov esi, dword [ebx + 0x40]
mov eax, dword [esi + 0x7c]
movzx ecx, word [eax + 0x2e]
movzx eax, word [esi + 0x16]
add ecx, 0x54
add eax, ecx
push eax
push 0
push eax
call fcn.0047f870
add esp, 4
push eax
call fcn.0052b3e0
push 0
mov dword [esp + 0x28], eax
mov byte [eax + 0x20], 0xff
mov dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0xffffffff
mov dword [eax + 0x40], esi
push dword [esi + 0x7c]
call fcn.004d7070
mov ecx, dword [esp + 0x2c]
add esp, 0x14
mov dword [ecx], eax
mov dword [ecx + 0x24], 1
mov dword [ecx + 0x44], 0
mov eax, dword [esi + 0xa4]
mov dword [ecx + 0x48], eax
mov dword [esi + 0xa4], ecx
mov esi, ecx
mov eax, dword [esi + 0x48]
test eax, eax
je 0x4d94b7
mov dword [eax + 0x44], esi
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x48]
lea ecx, [ecx + eax*4]
mov dword [esi + 0x38], ebx
mov dword [esi + 0x10], 0xffffffff
mov dword [esp + 0x2c], ecx
mov dword [ecx], esi
mov ecx, dword [esp + ebp*4 + 0x48]
mov word [esi + 0x20], 0x100
mov dword [esi + 0xc], 0
mov dword [esi + 0x24], 1
mov ecx, dword [ecx]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x34]
add ecx, eax
mov eax, dword [ebx + 0x40]
mov dword [esp + 0x18], ecx
movzx eax, word [eax + 0x16]
mov dword [esp + 0x14], eax
add eax, 8
mov dword [esp + 0x3c], eax
imul eax, ecx
test byte [ebx + 0x20], 2
mov dword [esp + 0x30], eax
je 0x4d9533
push 0
push 0
push str.hb_cdxPageIntSetKey:_page_is_a_leaf_
push 0x23f1
call fcn.0044a4a0
mov ecx, dword [esp + 0x28]
add esp, 0x10
test ecx, ecx
js 0x4d953f
mov eax, dword [ebx + 0xc]
inc eax
cmp ecx, eax
jl 0x4d9559
push 0
push 0
push str.hb_cdxPageIntSetKey:_wrong_iKey_index.
push 0x23f1
call fcn.0044a4a0
mov ecx, dword [esp + 0x28]
add esp, 0x10
mov edx, dword [esp + 0x30]
mov eax, dword [ebx + 0xc]
add edx, 0x58
add edx, ebx
mov dword [esp + 0x18], edx
cmp ecx, eax
jge 0x4d958f
sub eax, ecx
imul eax, dword [esp + 0x3c]
push eax
mov eax, dword [esp + 0x18]
add eax, 8
push edx
add eax, edx
push eax
call fcn.0052ae60
mov eax, dword [ebx + 0xc]
add esp, 0xc
mov edx, dword [esp + 0x18]
push dword [esp + 0x14]
inc eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebx + 0x40]
movzx eax, byte [eax + 0x1a]
push eax
push edx
call fcn.0052b3e0
mov eax, dword [esp + 0x24]
add esp, 0xc
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
bswap edx
mov dword [ecx + eax + 4], edx
mov ecx, dword [esp + 0x2c]
mov dword [ebx + 0x24], 1
mov ecx, dword [ecx - 4]
mov eax, dword [ecx]
mov dword [esi + 4], eax
mov eax, dword [ecx + 8]
mov dword [esi + 8], eax
mov eax, dword [esi]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x20]
cmp eax, ebp
jge 0x4d95ef
mov ecx, dword [esp + eax*4 + 0x4c]
inc ebp
mov eax, dword [esi]
mov dword [ecx + 4], eax
jmp 0x4d9740
cmp dword [esi + 8], 0xffffffff
je 0x4d961c
mov eax, dword [esp + ebp*4 + 0x48]
push dword [eax + 8]
push ebx
push dword [ebx + 0x40]
call fcn.004daef0
mov ecx, dword [esi]
push 0
push eax
mov dword [eax + 4], ecx
mov dword [eax + 0x24], 1
call fcn.004d8950
add esp, 0x14
inc ebp
jmp 0x4d9740
jge 0x4d9745
cmp esi, 1
jle 0x4d9650
mov edx, dword [esp + ebp*4 + 0x44]
mov ecx, dword [esp + esi*4 + 0x40]
mov eax, dword [edx]
mov dword [ecx + 8], eax
mov eax, dword [ecx]
mov dword [edx + 4], eax
mov eax, dword [esp + esi*4 + 0x44]
mov dword [esp + ebp*4 + 0x44], eax
mov dword [esp + esi*4 + 0x44], edx
jmp 0x4d96ec
mov ecx, dword [esp + 0x14]
test esi, esi
jle 0x4d9673
cmp dword [ecx + 4], 0xffffffff
jne 0x4d9673
mov eax, dword [esp + ebp*4 + 0x44]
mov dword [esp + ebp*4 + 0x44], ecx
mov dword [esp + 0x48], eax
mov dword [eax + 4], 0xffffffff
jmp 0x4d96ec
mov eax, dword [esp + ebp*4 + 0x44]
mov edx, dword [eax + 8]
mov dword [esp + 0x18], edx
test esi, esi
jle 0x4d9691
mov eax, dword [esp + esi*4 + 0x44]
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
mov dword [eax + 8], edx
jmp 0x4d96c4
mov ecx, dword [ecx + 4]
mov dword [esp + 0x14], ecx
cmp ecx, 0xffffffff
je 0x4d96c4
push ecx
push ebx
push dword [ebx + 0x40]
call fcn.004daef0
mov ecx, dword [esp + 0x24]
push 0
push eax
mov dword [eax + 8], ecx
mov dword [eax + 0x24], 1
call fcn.004d8950
mov edx, dword [esp + 0x2c]
add esp, 0x14
cmp edx, 0xffffffff
je 0x4d96ec
push edx
push ebx
push dword [ebx + 0x40]
call fcn.004daef0
mov ecx, dword [esp + 0x20]
push 0
push eax
mov dword [eax + 4], ecx
mov dword [eax + 0x24], 1
call fcn.004d8950
add esp, 0x14
dec ebp
cmp ebp, esi
jl 0x4d973e
mov edi, dword [esp + 0x34]
lea eax, [edi + ebp]
push eax
push ebx
call fcn.004d8d70
mov eax, dword [esp + ebp*4 + 0x50]
push 0
push eax
mov dword [eax + 0x38], 0
mov dword [eax + 0x24], 0
mov byte [eax + 0x20], 0xff
mov dword [eax + 4], 0xffffffff
mov dword [eax + 8], 0xffffffff
mov dword [eax + 0xc], 0
call fcn.004d8950
dec ebp
add esp, 0x10
cmp ebp, esi
jge 0x4d96f5
mov edi, dword [esp + 0x1c]
mov ebp, esi
or dword [esp + 0x10], 8
test edi, edi
jle 0x4d98f8
mov eax, dword [ebx + 0x40]
cmp word [eax + 0x78], 2
jne 0x4d976e
cmp ebp, 2
jle 0x4d976e
lea eax, [ebp*2 - 1]
cmp edi, eax
jne 0x4d976e
mov eax, 1
jmp 0x4d9770
xor eax, eax
mov ecx, dword [esp + 0x44]
xor edi, edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], ecx
test ebp, ebp
jle 0x4d98ec
test eax, eax
je 0x4d9797
cmp edi, 1
jne 0x4d9797
mov esi, edi
mov dword [esp + 0x18], esi
jmp 0x4d97ad
mov eax, dword [esp + 0x1c]
mov ecx, ebp
sub eax, edi
sub ecx, edi
dec eax
add eax, ebp
cdq
idiv ecx
mov esi, eax
mov dword [esp + 0x18], eax
mov ecx, dword [ebx + 0x40]
movzx ecx, word [ecx + 0x78]
cmp esi, ecx
jle 0x4d97ce
push 0
push 0
push str.hb_cdxPageKeyIntBalance:_iNodeKeys_calculated_wrong_
push 0x23f1
call fcn.0044a4a0
add esp, 0x10
imul esi, dword [esp + 0x40]
mov eax, dword [esp + edi*4 + 0x48]
add eax, 0x58
push esi
push dword [esp + 0x28]
push eax
call fcn.0052ae60
mov ecx, dword [esp + edi*4 + 0x54]
add esp, 0xc
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x34]
add dword [esp + 0x24], esi
add edx, edi
sub dword [esp + 0x1c], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x24], 1
mov dword [esp + 0x30], edx
cmp edx, dword [ebx + 0xc]
jge 0x4d98d4
mov eax, dword [esp + 0x24]
mov esi, dword [eax - 8]
mov eax, dword [ecx]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
sub eax, dword [esp + 0x40]
mov dword [esp + 0x3c], eax
mov eax, dword [ebx + 0x40]
bswap esi
movzx eax, word [eax + 0x16]
mov dword [esp + 0x14], eax
add eax, 8
imul eax, edx
test byte [ebx + 0x20], 2
mov dword [esp + 0x20], eax
je 0x4d9865
push 0
push 0
push str.hb_cdxPageIntSetKey:_page_is_a_leaf_
push 0x23f1
call fcn.0044a4a0
mov edx, dword [esp + 0x40]
add esp, 0x10
mov eax, dword [ebx + 0xc]
test edx, edx
js 0x4d9870
cmp edx, eax
jl 0x4d9886
push 0
push 0
push str.hb_cdxPageIntSetKey:_wrong_iKey_index.
push 0x23f1
call fcn.0044a4a0
add esp, 0x10
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4d98a5
push dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x28]
add eax, 0x58
add eax, ebx
push eax
call fcn.0052ae60
add esp, 0xc
mov ecx, dword [esp + 0x14]
test esi, esi
je 0x4d98b9
mov eax, dword [esp + 0x20]
add eax, ecx
bswap esi
mov dword [eax + ebx + 0x58], esi
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
add eax, ecx
mov ecx, dword [esp + edi*4 + 0x48]
bswap edx
mov dword [eax + ebx + 0x5c], edx
mov dword [ebx + 0x24], 1
push 0
push ecx
call fcn.004d8950
mov eax, dword [esp + 0x34]
inc edi
add esp, 8
cmp edi, ebp
jl 0x4d9786
push dword [esp + 0x44]
call fcn.0047f840
add esp, 4
mov eax, dword [ebx + 0x40]
mov dword [ebx + 0x24], 1
movzx ecx, word [eax + 0x78]
mov eax, dword [esp + 0x10]
or eax, 2
cmp dword [ebx + 0xc], ecx
cmovle eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00529c8c
add esp, 0x50
ret