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

Disassembly:
sub esp, 0x50
mov eax, dword [0x4d36a4]
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 0x4826eb
test al, 8
jne 0x4826eb
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.004a209e
add esp, 0x50
ret
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x482704
mov eax, dword [eax + 0x3c]
test eax, eax
je 0x482704
push 0
push eax
call fcn.00482090
add esp, 8
mov ecx, dword [ebx + 0xc]
cmp ecx, ebp
jle 0x482722
mov edx, dword [ebx + 0x10]
cmp edx, 1
jle 0x482722
lea eax, [edx + 1]
cmp eax, ecx
jl 0x48271f
lea edx, [ecx - 3]
jmp 0x482724
dec edx
jmp 0x482724
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 0x482748
cmp ebp, 2
jl 0x483055
mov dword [esp + 0x14], edi
test ebp, ebp
jle 0x4828af
mov eax, edx
mov esi, edx
not eax
mov dword [esp + 0x20], eax
nop
test esi, esi
js 0x482769
cmp esi, dword [ebx + 0xc]
jl 0x48277f
push 0
push 0
push str.hb_cdxPageGetKeyPage:_wrong_iKey_index.
push 0x23f1
call fcn.0044b600
add esp, 0x10
test byte [ebx + 0x20], 2
je 0x48279b
push 0
push 0
push str.hb_cdxPageGetKeyPage:_page_is_a_leaf.
push 0x23f1
call fcn.0044b600
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 0x4827c5
cmp dword [ecx], eax
jne 0x4827c5
mov dword [ebx + 0x3c], 0
jmp 0x4827d2
push eax
push ebx
push edx
call fcn.00484630
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 0x48286e
mov eax, dword [esp + eax + 0x44]
mov eax, dword [eax + 8]
mov dword [esp + 0x38], eax
cmp dword [ecx], eax
jne 0x482820
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 0x48286e
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.00488930
push 1
call fcn.004a4d24
push eax
call fcn.004a8013
push 0
push 0
push str.hb_cdxPageKeyIntBalance:_index_corrupted.
push 0x23f1
call fcn.0044b600
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 0x482760
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 0x482908
cmp ebp, 1
jle 0x482908
cmp dword [ecx + 4], 0xffffffff
mov edx, dword [esp + 0x38]
je 0x48290c
mov eax, dword [esp + ebp*4 + 0x44]
cmp dword [eax + 8], 0xffffffff
je 0x48290c
cmp edi, 6
jl 0x48290c
lea eax, [edx + edx*2]
sar eax, 1
cmp edi, eax
mov eax, 2
cmovg esi, eax
mov dword [esp + 0x20], esi
jmp 0x48290c
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 0x482ab0
cmp dword [esp + 0x28], 2
jge 0x48295c
cmp dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
je 0x482ab7
cmp ebp, 1
jne 0x4829bd
cmp edi, edx
jle 0x4829bd
mov eax, dword [ecx + 8]
cmp eax, 0xffffffff
je 0x4829bd
push eax
push ebx
push dword [ebx + 0x40]
call fcn.00484630
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 0x482aac
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 0x482a31
mov ebx, edx
mov edx, dword [esp + ebx*4 + 0x48]
mov edx, dword [edx + 0xc]
cmp edx, ecx
jl 0x482a29
cmp edx, eax
jg 0x482a29
push 0
push dword [esp + ebx*4 + 0x4c]
sub edi, edx
call fcn.00482090
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 0x4829e7
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x1c], edi
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x10], edx
cmp ebp, 2
jle 0x482aac
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x10], edx
mov edx, dword [ebx + 0xc]
cmp edx, ecx
jl 0x482aa4
cmp edx, eax
jg 0x482aa4
sub edi, edx
push 0
push ebx
mov dword [esp + 0x24], edi
call fcn.00482090
inc dword [esp + 0x3c]
dec ebp
add esp, 8
test ebp, ebp
jle 0x482a83
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 0x482a46
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x18], 0
jne 0x482afa
cmp ebp, 2
jl 0x482ac3
cmp dword [esp + 0x28], 2
jge 0x482afa
xor esi, esi
test ebp, ebp
jle 0x483055
nop dword [eax]
push 0
push dword [esp + esi*4 + 0x4c]
call fcn.00482090
inc esi
add esp, 8
cmp esi, ebp
jl 0x482ad0
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.004a209e
add esp, 0x50
ret
test edi, edi
jle 0x482b5b
mov eax, edi
imul eax, dword [esp + 0x40]
push eax
call fcn.004340b0
add esp, 4
mov dword [esp + 0x44], eax
xor edi, edi
mov dword [esp + 0x30], eax
test ebp, ebp
jle 0x482b57
mov esi, dword [esp + 0x40]
mov ebx, eax
mov ecx, dword [esp + edi*4 + 0x48]
mov eax, dword [ecx + 0xc]
test eax, eax
jle 0x482b4a
imul eax, esi
push eax
lea eax, [ecx + 0x58]
push eax
push ebx
call fcn.004a34e0
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 0x482b22
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
cmp esi, ebp
jle 0x482d62
cmp ebp, 2
jge 0x482b6e
mov dword [esp + 0x20], ebp
jmp 0x482b7d
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.004340b0
add esp, 4
push eax
call fcn.004a3fe0
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.00480730
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 0x482bf7
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 0x482c73
push 0
push 0
push str.hb_cdxPageIntSetKey:_page_is_a_leaf_
push 0x23f1
call fcn.0044b600
mov ecx, dword [esp + 0x28]
add esp, 0x10
test ecx, ecx
js 0x482c7f
mov eax, dword [ebx + 0xc]
inc eax
cmp ecx, eax
jl 0x482c99
push 0
push 0
push str.hb_cdxPageIntSetKey:_wrong_iKey_index.
push 0x23f1
call fcn.0044b600
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 0x482ccf
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.004a3a60
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.004a3fe0
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 0x482d2f
mov ecx, dword [esp + eax*4 + 0x4c]
inc ebp
mov eax, dword [esi]
mov dword [ecx + 4], eax
jmp 0x482e80
cmp dword [esi + 8], 0xffffffff
je 0x482d5c
mov eax, dword [esp + ebp*4 + 0x48]
push dword [eax + 8]
push ebx
push dword [ebx + 0x40]
call fcn.00484630
mov ecx, dword [esi]
push 0
push eax
mov dword [eax + 4], ecx
mov dword [eax + 0x24], 1
call fcn.00482090
add esp, 0x14
inc ebp
jmp 0x482e80
jge 0x482e85
cmp esi, 1
jle 0x482d90
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 0x482e2c
mov ecx, dword [esp + 0x14]
test esi, esi
jle 0x482db3
cmp dword [ecx + 4], 0xffffffff
jne 0x482db3
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 0x482e2c
mov eax, dword [esp + ebp*4 + 0x44]
mov edx, dword [eax + 8]
mov dword [esp + 0x18], edx
test esi, esi
jle 0x482dd1
mov eax, dword [esp + esi*4 + 0x44]
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
mov dword [eax + 8], edx
jmp 0x482e04
mov ecx, dword [ecx + 4]
mov dword [esp + 0x14], ecx
cmp ecx, 0xffffffff
je 0x482e04
push ecx
push ebx
push dword [ebx + 0x40]
call fcn.00484630
mov ecx, dword [esp + 0x24]
push 0
push eax
mov dword [eax + 8], ecx
mov dword [eax + 0x24], 1
call fcn.00482090
mov edx, dword [esp + 0x2c]
add esp, 0x14
cmp edx, 0xffffffff
je 0x482e2c
push edx
push ebx
push dword [ebx + 0x40]
call fcn.00484630
mov ecx, dword [esp + 0x20]
push 0
push eax
mov dword [eax + 4], ecx
mov dword [eax + 0x24], 1
call fcn.00482090
add esp, 0x14
dec ebp
cmp ebp, esi
jl 0x482e7e
mov edi, dword [esp + 0x34]
lea eax, [edi + ebp]
push eax
push ebx
call fcn.004824b0
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.00482090
dec ebp
add esp, 0x10
cmp ebp, esi
jge 0x482e35
mov edi, dword [esp + 0x1c]
mov ebp, esi
or dword [esp + 0x10], 8
test edi, edi
jle 0x483038
mov eax, dword [ebx + 0x40]
cmp word [eax + 0x78], 2
jne 0x482eae
cmp ebp, 2
jle 0x482eae
lea eax, [ebp*2 - 1]
cmp edi, eax
jne 0x482eae
mov eax, 1
jmp 0x482eb0
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 0x48302c
test eax, eax
je 0x482ed7
cmp edi, 1
jne 0x482ed7
mov esi, edi
mov dword [esp + 0x18], esi
jmp 0x482eed
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 0x482f0e
push 0
push 0
push str.hb_cdxPageKeyIntBalance:_iNodeKeys_calculated_wrong_
push 0x23f1
call fcn.0044b600
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.004a34e0
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 0x483014
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 0x482fa5
push 0
push 0
push str.hb_cdxPageIntSetKey:_page_is_a_leaf_
push 0x23f1
call fcn.0044b600
mov edx, dword [esp + 0x40]
add esp, 0x10
mov eax, dword [ebx + 0xc]
test edx, edx
js 0x482fb0
cmp edx, eax
jl 0x482fc6
push 0
push 0
push str.hb_cdxPageIntSetKey:_wrong_iKey_index.
push 0x23f1
call fcn.0044b600
add esp, 0x10
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x482fe5
push dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x28]
add eax, 0x58
add eax, ebx
push eax
call fcn.004a34e0
add esp, 0xc
mov ecx, dword [esp + 0x14]
test esi, esi
je 0x482ff9
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.00482090
mov eax, dword [esp + 0x34]
inc edi
add esp, 8
cmp edi, ebp
jl 0x482ec6
push dword [esp + 0x44]
call fcn.00434080
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.004a209e
add esp, 0x50
ret