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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x101e42fc]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x30], 0
mov ecx, 3
mov dword [esp + 0x34], 0
movzx edx, byte [edi + 0x2d]
inc edx
sub ecx, edx
mov dword [esp + 0x38], edx
cmp byte [edi + 0x2b], 0
mov dword [esp + 0x10], ecx
jne 0x1005d23f
mov eax, dword [edi + 4]
push 0xa
push ecx
push edx
mov esi, dword [eax]
push eax
mov esi, dword [esi + 0x38]
mov ecx, esi
call dword [0x1018a4d4]
call esi
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x1005d59f
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
cmp byte [edi + 0x2b], bl
jne 0x1005d23f
mov eax, dword [edi + 4]
push 0xa
push 4
push 4
mov esi, dword [eax]
push eax
mov esi, dword [esi + 0x38]
mov ecx, esi
call dword [0x1018a4d4]
call esi
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x1005d23f
cmp byte [edi + 0x2b], 0
jne 0x1005d59f
push 9
push dword [esp + 0x14]
push dword [esp + 0x40]
jmp 0x1005d589
push 0x30
lea eax, [edi + 0x34]
push 0
push eax
call fcn.10150b00
mov eax, dword [edi + 8]
lea edx, [esp + 0x2c]
add esp, 0xc
mov ecx, dword [eax]
push edx
push eax
mov esi, dword [ecx + 0x18]
mov ecx, esi
call dword [0x1018a4d4]
call esi
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1005d555
cmp dword [esp + 0x24], eax
jl 0x1005d4e2
jg 0x1005d28b
cmp dword [esp + 0x20], 0x20
jbe 0x1005d4e2
mov eax, dword [edi + 8]
lea ecx, [esp + 0x54]
push 0
push 0
push 0x20
mov esi, dword [eax]
push ecx
push eax
mov esi, dword [esi + 8]
mov ecx, esi
call dword [0x1018a4d4]
call esi
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x1005d555
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x5c]
bswap ecx
mov eax, ecx
and eax, 0xfffffffe
bswap esi
mov dword [esp + 0x50], esi
cmp eax, 0x377f0682
jne 0x1005d4e2
lea eax, [esi - 1]
test esi, eax
jne 0x1005d4e2
cmp esi, 0x10000
jg 0x1005d4e2
cmp esi, 0x200
jl 0x1005d4e2
mov eax, dword [esp + 0x60]
lea edx, [esp + 0x54]
bswap eax
mov dword [edi + 0x70], eax
and cl, 1
mov eax, dword [esp + 0x64]
mov dword [edi + 0x54], eax
mov eax, dword [esp + 0x68]
mov dword [edi + 0x58], eax
lea eax, [edi + 0x4c]
push eax
mov byte [edi + 0x41], cl
movzx ecx, cl
push ebx
push 0x18
xor ecx, 1
mov dword [edi + 0x24], esi
call fcn.1005cdc0
mov eax, dword [esp + 0x78]
add esp, 0xc
bswap eax
cmp dword [edi + 0x4c], eax
jne 0x1005d4e2
mov eax, dword [esp + 0x70]
bswap eax
cmp dword [edi + 0x50], eax
jne 0x1005d4e2
mov eax, dword [esp + 0x58]
bswap eax
cmp eax, 0x2de218
je 0x1005d385
push 0x101c4d0c
push 0xe8d4
push str.cannot_open_file
push str._s_at_line__d_of___.10s_
push 0xe
call fcn.1004f030
add esp, 0x14
mov ebx, 0xe
jmp 0x1005d555
add esi, 0x18
mov dword [esp + 0x3c], esi
call fcn.100db150
test eax, eax
jne 0x1005d5b3
mov eax, esi
cdq
mov ecx, edx
mov dword [esp + 0x2c], eax
push ecx
push eax
mov dword [esp + 0x24], ecx
call fcn.1004c100
mov edx, eax
add esp, 8
mov dword [esp + 0xc], edx
test edx, edx
je 0x1005d5b3
mov ecx, dword [esp + 0x2c]
lea eax, [edx + 0x18]
xor esi, esi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x1c]
add ecx, 0x20
mov dword [esp + 0x14], 0x20
adc eax, esi
mov dword [esp + 0x18], esi
cmp eax, dword [esp + 0x24]
jg 0x1005d4d5
jl 0x1005d3f6
cmp ecx, dword [esp + 0x20]
ja 0x1005d4d5
push dword [esp + 0x18]
mov eax, dword [edi + 8]
inc esi
push dword [esp + 0x18]
mov dword [esp + 0x50], esi
push dword [esp + 0x44]
mov esi, dword [eax]
push edx
push eax
mov esi, dword [esi + 8]
mov ecx, esi
call dword [0x1018a4d4]
call esi
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x1005d4d1
push dword [esp + 0xc]
lea eax, [esp + 0x50]
mov ecx, edi
push dword [esp + 0x44]
lea edx, [esp + 0x4c]
push eax
call fcn.1005cf20
add esp, 0xc
test eax, eax
je 0x1005d4d1
push dword [esp + 0x44]
mov esi, dword [esp + 0x4c]
mov ecx, edi
mov edx, esi
call fcn.1005d080
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x1005d4d1
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x1005d495
mov dword [edi + 0x48], eax
mov eax, dword [esp + 0x50]
mov ecx, eax
and eax, 0xff00
sar ecx, 0x10
or ecx, eax
mov dword [edi + 0x44], esi
mov word [edi + 0x42], cx
mov eax, dword [edi + 0x4c]
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x50]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
add eax, ecx
mov edx, dword [esp + 0x18]
adc edx, dword [esp + 0x1c]
add ecx, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
adc eax, edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0xc]
cmp eax, dword [esp + 0x24]
jl 0x1005d3f6
jg 0x1005d4d1
cmp ecx, dword [esp + 0x20]
jbe 0x1005d3f6
mov edx, dword [esp + 0xc]
push edx
call fcn.1004c320
add esp, 4
test ebx, ebx
jne 0x1005d555
mov eax, dword [esp + 0x30]
mov ecx, edi
mov dword [edi + 0x4c], eax
mov eax, dword [esp + 0x34]
mov dword [edi + 0x50], eax
call fcn.1005ce80
mov eax, dword [edi + 0x20]
mov ecx, dword [eax]
mov dword [ecx + 0x60], 0
lea edx, [ecx + 0x68]
mov eax, dword [edi + 0x44]
mov dword [ecx + 0x80], eax
mov eax, edx
mov dword [ecx + 0x64], 0
mov ecx, 4
nop dword [eax]
mov dword [eax], 0xffffffff
lea eax, [eax + 4]
sub ecx, 1
jne 0x1005d520
mov eax, dword [edi + 0x44]
test eax, eax
je 0x1005d537
mov dword [edx], eax
cmp dword [edi + 0x48], 0
je 0x1005d555
push dword [edi + 0x6c]
push dword [edi + 0x44]
push str.recovered__d_frames_from_WAL_file__s
push 0x11b
call fcn.1004f030
add esp, 0x10
mov al, byte [edi + 0x2b]
test al, al
jne 0x1005d59f
mov eax, dword [edi + 4]
push 9
push dword [esp + 0x14]
mov esi, dword [eax]
push dword [esp + 0x40]
push eax
mov esi, dword [esi + 0x38]
mov ecx, esi
call dword [0x1018a4d4]
call esi
mov al, byte [edi + 0x2b]
add esp, 0x10
test al, al
jne 0x1005d59f
push 9
push 4
push 4
mov eax, dword [edi + 4]
push eax
mov esi, dword [eax]
mov esi, dword [esi + 0x38]
mov ecx, esi
call dword [0x1018a4d4]
call esi
add esp, 0x10
mov ecx, dword [esp + 0x74]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1014d1d5
mov esp, ebp
pop ebp
ret
mov ebx, 7
jmp 0x1005d555