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

Disassembly:
sub esp, 0x5c
mov eax, dword [0x518450]
xor eax, esp
mov dword [esp + 0x58], eax
and dword [esp + 0x18], 0
and dword [esp + 0x1c], 0
push ebp
push esi
mov esi, dword [esp + 0x68]
push 8
pop eax
movzx ebp, byte [esi + 0x28]
inc ebp
sub eax, ebp
mov dword [esp + 0x34], ebp
push eax
push ebp
push esi
mov dword [esp + 0x38], eax
call fcn.004b67d0
add esp, 0xc
test eax, eax
jne 0x4b648c
push edi
push 0x30
push eax
lea eax, [esi + 0x2c]
push eax
call fcn.004bf040
mov eax, dword [esi + 8]
lea edx, [esp + 0x24]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4b647b
push ebx
cmp dword [esp + 0x20], eax
jl 0x4b6427
push 0x20
pop edx
jg 0x4b61f5
cmp dword [esp + 0x1c], edx
jbe 0x4b6427
mov eax, dword [esi + 8]
push 0
push 0
push edx
mov ecx, dword [eax]
lea edx, [esp + 0x54]
push edx
push eax
call dword [ecx + 8]
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4b647a
lea eax, [esp + 0x48]
push eax
call fcn.0049d05b
mov ecx, eax
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x18], ecx
call fcn.0049d05b
mov edx, dword [esp + 0x18]
mov ebx, eax
pop ecx
pop ecx
mov ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x377f0682
jne 0x4b6427
lea ecx, [ebx - 1]
test ebx, ecx
jne 0x4b6427
lea eax, [ebx - 0x200]
cmp eax, 0xfe00
ja 0x4b6427
and dl, 1
mov dword [esi + 0x20], ebx
lea eax, [esp + 0x54]
mov dword [esp + 0x10], edx
push eax
mov byte [esi + 0x39], dl
call fcn.0049d05b
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x60], eax
mov eax, dword [esp + 0x5c]
mov dword [esi + 0x4c], eax
mov eax, dword [esp + 0x60]
mov dword [esi + 0x50], eax
lea eax, [esi + 0x44]
push eax
push edi
push 0x18
lea eax, [esp + 0x58]
push eax
xor eax, eax
test cl, cl
sete al
push eax
call fcn.004b5c1f
lea eax, [esp + 0x78]
push eax
call fcn.0049d05b
add esp, 0x1c
cmp dword [esi + 0x44], eax
jne 0x4b6427
lea eax, [esp + 0x64]
push eax
call fcn.0049d05b
pop ecx
cmp dword [esi + 0x48], eax
jne 0x4b6427
lea eax, [esp + 0x4c]
push eax
call fcn.0049d05b
pop ecx
cmp eax, 0x2de218
je 0x4b62f6
push 0xb10c
call fcn.004968a8
mov edi, eax
jmp 0x4b6422
lea eax, [ebx + 0x18]
push eax
call fcn.0047ba81
mov dword [esp + 0x18], eax
pop ecx
test eax, eax
jne 0x4b6310
push 7
pop edi
jmp 0x4b647a
add eax, 0x18
xor ecx, ecx
and dword [esp + 0x18], ecx
mov dword [esp + 0x40], eax
lea eax, [ebx + 0x18]
cdq
mov dword [esp + 0x10], ecx
mov ecx, edx
mov dword [esp + 0x44], eax
add eax, 0x20
mov dword [esp + 0x24], ecx
adc ecx, 0
cmp ecx, dword [esp + 0x20]
jg 0x4b6419
jl 0x4b634b
cmp eax, dword [esp + 0x1c]
ja 0x4b6419
mov edx, dword [esp + 0x18]
push 0x20
pop ebp
push edx
push ebp
lea eax, [ebx + 0x18]
push eax
push dword [esp + 0x20]
push dword [esi + 8]
call fcn.004a0109
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4b6415
push dword [esp + 0x14]
lea eax, [esp + 0x34]
push dword [esp + 0x44]
push eax
lea eax, [esp + 0x44]
push eax
push esi
call fcn.004b5d4a
add esp, 0x14
test eax, eax
je 0x4b6415
mov eax, dword [esp + 0x10]
push dword [esp + 0x38]
inc eax
push eax
push esi
mov dword [esp + 0x1c], eax
call fcn.004b5eb3
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4b6415
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4b63e3
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x3c], ecx
mov ecx, ebx
mov dword [esi + 0x40], eax
mov eax, ebx
and eax, 0xff00
sar ecx, 0x10
or ecx, eax
mov word [esi + 0x3a], cx
mov eax, dword [esi + 0x44]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x48]
mov dword [esp + 0x2c], eax
add ebp, dword [esp + 0x44]
mov edx, dword [esp + 0x18]
adc edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x24]
add ecx, ebp
mov dword [esp + 0x18], edx
adc eax, edx
cmp eax, dword [esp + 0x20]
jl 0x4b6352
jg 0x4b6415
cmp ecx, dword [esp + 0x1c]
jbe 0x4b6352
mov ebp, dword [esp + 0x3c]
push dword [esp + 0x14]
call fcn.0047bac8
pop ecx
test edi, edi
jne 0x4b647a
mov eax, dword [esp + 0x28]
mov dword [esi + 0x44], eax
mov eax, dword [esp + 0x2c]
push esi
mov dword [esi + 0x48], eax
call fcn.004b6586
mov eax, dword [esi + 0x1c]
pop ecx
push 4
pop ecx
mov eax, dword [eax]
mov dword [eax + 0x60], 0
mov dword [eax + 0x64], 0
add eax, 0x68
mov dword [eax], 0xffffffff
lea eax, [eax + 4]
dec ecx
jne 0x4b6455
cmp dword [esi + 0x40], ecx
je 0x4b647a
push dword [esi + 0x5c]
push dword [esi + 0x40]
push str.Recovered__d_frames_from_WAL_file__s
push ecx
call fcn.0047b9ab
add esp, 0x10
pop ebx
push dword [esp + 0x30]
push ebp
push esi
call fcn.004b6d3f
add esp, 0xc
mov eax, edi
pop edi
mov ecx, dword [esp + 0x60]
pop esi
pop ebp
xor ecx, esp
call fcn.004b9a6c
add esp, 0x5c
ret