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

Disassembly:
sub esp, 0x68
mov eax, dword [0x6651c0]
xor eax, esp
mov dword [esp + 0x64], eax
push ebp
push edi
mov edi, dword [esp + 0x74]
xor ebp, ebp
and dword [esp + 0x20], ebp
push 3
pop eax
movzx ecx, byte [edi + 0x2d]
inc ecx
mov dword [esp + 0x1c], ebp
sub eax, ecx
mov dword [esp + 0x48], ecx
push eax
push ecx
push edi
call fcn.00593007
add esp, 0xc
test eax, eax
jne 0x592c5d
push esi
push 0x30
push eax
lea eax, [edi + 0x34]
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [edi + 8]
lea edx, [esp + 0x34]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x592c46
xor edx, edx
push ebx
cmp dword [esp + 0x30], edx
jl 0x592b9f
jg 0x59289e
cmp dword [esp + 0x2c], 0x20
jbe 0x592b9f
mov eax, dword [edi + 8]
push edx
push edx
push 0x20
mov ecx, dword [eax]
lea edx, [esp + 0x60]
push edx
push eax
call dword [ecx + 8]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x592c45
lea eax, [esp + 0x54]
push eax
call fcn.005694f9
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x60]
push eax
call fcn.005694f9
pop ecx
pop ecx
mov ebx, eax
mov eax, dword [esp + 0x18]
mov ecx, eax
and ecx, 0xfffffffe
cmp ecx, 0x377f0682
jne 0x592b9f
lea ecx, [ebx - 1]
test ebx, ecx
jne 0x592b9f
cmp ebx, 0x10000
jg 0x592b9f
cmp ebx, 0x200
jl 0x592b9f
and al, 1
mov dword [edi + 0x24], ebx
mov byte [edi + 0x41], al
lea eax, [esp + 0x60]
push eax
call fcn.005694f9
mov dword [edi + 0x70], eax
lea eax, [esp + 0x68]
push 8
push eax
lea eax, [edi + 0x54]
push eax
call sub.VCRUNTIME140.dll_memcpy
lea esi, [edi + 0x4c]
push esi
push 0
push 0x18
lea eax, [esp + 0x70]
push eax
xor eax, eax
cmp byte [edi + 0x41], al
sete al
push eax
call fcn.00591a68
lea eax, [esp + 0x90]
push eax
call fcn.005694f9
add esp, 0x28
cmp dword [esi], eax
jne 0x592b9f
lea eax, [esp + 0x70]
push eax
call fcn.005694f9
pop ecx
cmp dword [edi + 0x50], eax
jne 0x592b9f
lea eax, [esp + 0x58]
push eax
call fcn.005694f9
pop ecx
cmp eax, 0x2de218
je 0x5929a0
push 0x1019e
call fcn.0055d525
mov esi, eax
jmp 0x592b96
lea eax, [ebx + 0x8018]
push 0
push eax
call fcn.005319be
mov ebp, eax
mov dword [edi + 0x78], ebp
pop ecx
pop ecx
test ebp, ebp
jne 0x5929c1
push 7
pop esi
jmp 0x592c45
mov esi, dword [esp + 0x2c]
lea eax, [ebp + 0x18]
mov ecx, dword [esp + 0x30]
add eax, ebx
mov dword [esp + 0x18], eax
sub esi, 0x20
lea eax, [ebx + 0x18]
cdq
sbb ecx, 0
push edx
push eax
push ecx
push esi
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], edx
call fcn.0059d8d0
mov edx, eax
xor eax, eax
mov dword [esp + 0x4c], edx
mov dword [esp + 0x14], eax
lea ecx, [edx + 0x21]
shr ecx, 0xc
mov dword [esp + 0x48], ecx
mov ecx, eax
shl ecx, 0xc
mov dword [esp + 0x10], ecx
add ecx, 0xfde
cmp edx, ecx
cmovb ecx, edx
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x1c]
push ecx
push eax
push edi
call fcn.0059253e
mov esi, eax
add esp, 0xc
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x592b88
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [edi + 0x7c], eax
mov eax, dword [edi + 0x20]
mov dword [edi + 0x80], edx
push 1
mov dword [eax + edx*4], ecx
mov eax, dword [esp + 0x14]
add eax, 0xffffffdf
test edx, edx
pop ecx
cmove eax, ecx
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x20]
ja 0x592b17
push dword [esp + 0x34]
dec eax
push dword [esp + 0x3c]
push 0
push eax
call fcn.0059da60
add eax, 0x20
adc edx, 0
push edx
push eax
lea eax, [ebx + 0x18]
push eax
push ebp
push dword [edi + 8]
call fcn.0056d90c
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x592b13
push ebp
lea eax, [ebp + 0x18]
push eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x48]
push eax
push edi
call fcn.00591c38
add esp, 0x14
test eax, eax
je 0x592b13
push dword [esp + 0x3c]
push dword [esp + 0x14]
push edi
call fcn.00592437
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x592b13
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x592b00
mov eax, dword [esp + 0x10]
mov dword [edi + 0x48], ecx
mov ecx, ebx
mov dword [edi + 0x44], eax
mov eax, ebx
and eax, 0xff00
sar ecx, 0x10
or ecx, eax
mov word [edi + 0x42], cx
mov eax, dword [edi + 0x4c]
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x50]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x20]
jbe 0x592a6c
mov edx, dword [esp + 0x14]
mov eax, dword [edi + 0x20]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x44], 0x7f78
mov dword [eax + edx*4], ecx
xor ecx, ecx
and dword [edi + 0x80], 0
mov eax, 0x88
and dword [edi + 0x7c], 0
test edx, edx
cmove ecx, eax
mov eax, 0x8000
cmove eax, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x1c]
add eax, ecx
push eax
mov eax, dword [esp + 0x24]
add eax, ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
push edi
call fcn.00555d6d
mov eax, dword [esp + 0x30]
add esp, 0x10
cmp dword [esp + 0x10], eax
jbe 0x592b88
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x4c]
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x48]
jbe 0x592a03
and dword [edi + 0x78], 0
push ebp
call fcn.00531a22
mov ebp, dword [esp + 0x28]
pop ecx
test esi, esi
jne 0x592c45
mov eax, dword [esp + 0x28]
push edi
mov dword [edi + 0x4c], ebp
mov dword [edi + 0x50], eax
call fcn.00592d5a
push edi
call fcn.00591bb7
mov ebp, eax
pop ecx
pop ecx
mov dword [ebp], 0
mov ecx, dword [edi + 0x44]
mov dword [ebp + 0x20], ecx
xor ecx, ecx
inc ecx
mov dword [ebp + 4], 0
mov ebx, ecx
push ecx
lea eax, [ebx + 3]
push eax
push edi
call fcn.00593007
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x592c19
inc eax
cmp ebx, eax
jne 0x592bf8
cmp dword [edi + 0x44], esi
je 0x592bf8
mov eax, dword [edi + 0x44]
mov dword [ebp + 8], eax
jmp 0x592c00
mov dword [ebp + ebx*4 + 4], 0xffffffff
push edi
call fcn.00555d6d
xor eax, eax
inc eax
push eax
lea eax, [ebx + 3]
push eax
push edi
call fcn.0059370d
add esp, 0x10
jmp 0x592c1e
cmp esi, 5
jne 0x592c45
inc ebx
push 1
pop ecx
cmp ebx, 5
jl 0x592bd2
cmp dword [edi + 0x48], 0
je 0x592c45
push dword [edi + 0x6c]
push dword [edi + 0x44]
push str.recovered__d_frames_from_WAL_file__s
push 0x11b
call fcn.0052882c
add esp, 0x10
pop ebx
mov eax, dword [esp + 0x4c]
push 3
pop ecx
sub ecx, eax
push ecx
push eax
push edi
call fcn.0059370d
add esp, 0xc
mov eax, esi
pop esi
mov ecx, dword [esp + 0x6c]
pop edi
pop ebp
xor ecx, esp
call fcn.0059d866
add esp, 0x68
ret