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

Disassembly:
sub esp, 0x5c
mov eax, dword [0x5107c0]
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.004b0349
add esp, 0xc
test eax, eax
jne 0x4b0005
push edi
push 0x30
push eax
lea eax, [esi + 0x2c]
push eax
call fcn.004b6030
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 0x4afff4
push ebx
cmp dword [esp + 0x20], eax
jl 0x4affa0
push 0x20
pop edx
jg 0x4afd6e
cmp dword [esp + 0x1c], edx
jbe 0x4affa0
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 0x4afff3
lea eax, [esp + 0x48]
push eax
call fcn.00496bd1
mov ecx, eax
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x18], ecx
call fcn.00496bd1
mov edx, dword [esp + 0x18]
mov ebx, eax
pop ecx
pop ecx
mov ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x377f0682
jne 0x4affa0
lea ecx, [ebx - 1]
test ebx, ecx
jne 0x4affa0
lea eax, [ebx - 0x200]
cmp eax, 0xfe00
ja 0x4affa0
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.00496bd1
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.004af798
lea eax, [esp + 0x78]
push eax
call fcn.00496bd1
add esp, 0x1c
cmp dword [esi + 0x44], eax
jne 0x4affa0
lea eax, [esp + 0x64]
push eax
call fcn.00496bd1
pop ecx
cmp dword [esi + 0x48], eax
jne 0x4affa0
lea eax, [esp + 0x4c]
push eax
call fcn.00496bd1
pop ecx
cmp eax, 0x2de218
je 0x4afe6f
push 0xb10c
call fcn.0049041e
mov edi, eax
jmp 0x4aff9b
lea eax, [ebx + 0x18]
push eax
call fcn.004755f7
mov dword [esp + 0x18], eax
pop ecx
test eax, eax
jne 0x4afe89
push 7
pop edi
jmp 0x4afff3
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 0x4aff92
jl 0x4afec4
cmp eax, dword [esp + 0x1c]
ja 0x4aff92
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.00499c82
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4aff8e
push dword [esp + 0x14]
lea eax, [esp + 0x34]
push dword [esp + 0x44]
push eax
lea eax, [esp + 0x44]
push eax
push esi
call fcn.004af8c3
add esp, 0x14
test eax, eax
je 0x4aff8e
mov eax, dword [esp + 0x10]
push dword [esp + 0x38]
inc eax
push eax
push esi
mov dword [esp + 0x1c], eax
call fcn.004afa2c
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4aff8e
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4aff5c
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 0x4afecb
jg 0x4aff8e
cmp ecx, dword [esp + 0x1c]
jbe 0x4afecb
mov ebp, dword [esp + 0x3c]
push dword [esp + 0x14]
call fcn.0047563e
pop ecx
test edi, edi
jne 0x4afff3
mov eax, dword [esp + 0x28]
mov dword [esi + 0x44], eax
mov eax, dword [esp + 0x2c]
push esi
mov dword [esi + 0x48], eax
call fcn.004b00ff
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 0x4affce
cmp dword [esi + 0x40], ecx
je 0x4afff3
push dword [esi + 0x5c]
push dword [esi + 0x40]
push str.Recovered__d_frames_from_WAL_file__s
push ecx
call fcn.00475521
add esp, 0x10
pop ebx
push dword [esp + 0x30]
push ebp
push esi
call fcn.004b08b8
add esp, 0xc
mov eax, edi
pop edi
mov ecx, dword [esp + 0x60]
pop esi
pop ebp
xor ecx, esp
call fcn.004b35e5
add esp, 0x5c
ret