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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
mov eax, dword [0x10165004]
xor eax, esp
mov dword [esp + 0x80], eax
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x3c], 0
push edi
mov dword [esp + 0x44], 0
movzx ebx, byte [esi + 0x2d]
inc ebx
cmp byte [esi + 0x2b], 0
mov dword [esp + 0x18], ebx
jne 0x100314df
mov ecx, dword [esi + 4]
mov eax, 3
push 0xa
sub eax, ebx
push eax
mov edx, dword [ecx]
push ebx
push ecx
mov eax, dword [edx + 0x38]
call eax
add esp, 0x10
test eax, eax
jne 0x100319d8
push 0x30
lea eax, [esi + 0x34]
push 0
push eax
call fcn.1012aa20
mov eax, dword [esi + 8]
lea edx, [esp + 0x54]
add esp, 0xc
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
mov edi, eax
add esp, 8
test edi, edi
jne 0x100319b7
cmp dword [esp + 0x4c], eax
jl 0x100318d0
jg 0x10031523
cmp dword [esp + 0x48], 0x20
jbe 0x100318d0
mov eax, dword [esi + 8]
lea edx, [esp + 0x6c]
push 0
push 0
push 0x20
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 8]
call eax
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x100319b7
mov edx, dword [esp + 0x6c]
mov edi, dword [esp + 0x74]
bswap edx
mov eax, edx
and eax, 0xfffffffe
bswap edi
mov dword [esp + 0x68], edi
cmp eax, 0x377f0682
jne 0x100318d0
lea eax, [edi - 1]
test edi, eax
jne 0x100318d0
cmp edi, 0x10000
jg 0x100318d0
cmp edi, 0x200
jl 0x100318d0
mov eax, dword [esp + 0x78]
lea ebx, [esi + 0x4c]
mov ecx, dword [esp + 0x80]
and dl, 1
bswap eax
mov dword [esi + 0x58], ecx
push ebx
movzx ecx, dl
mov byte [esi + 0x41], dl
xor ecx, 1
mov dword [esi + 0x70], eax
lea edx, [esp + 0x70]
mov eax, dword [esp + 0x80]
push 0
push 0x18
mov dword [esi + 0x24], edi
mov dword [esi + 0x54], eax
call fcn.100310a0
mov eax, dword [esp + 0x90]
add esp, 0xc
bswap eax
cmp dword [ebx], eax
jne 0x100318d0
mov eax, dword [esp + 0x88]
bswap eax
cmp dword [esi + 0x50], eax
jne 0x100318d0
mov eax, dword [esp + 0x70]
bswap eax
cmp eax, 0x2de218
je 0x10031621
push 0x10156dc4
push 0xfc08
push str.cannot_open_file
push str._s_at_line__d_of___.10s_
push 0xe
call fcn.10021520
add esp, 0x14
mov edi, 0xe
jmp 0x100319b3
lea ebx, [edi + 0x18]
mov dword [esp + 0x58], ebx
call fcn.100cad40
test eax, eax
jne 0x10031921
lea eax, [edi + 0x8018]
push 0
push eax
call fcn.1001e1a0
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
je 0x10031921
mov ecx, dword [esp + 0x4c]
add eax, 0x18
mov dword [esp + 0x5c], eax
add eax, edi
mov edi, dword [esp + 0x48]
mov dword [esp + 0x38], eax
sub edi, 0x20
mov eax, ebx
cdq
sbb ecx, 0
mov ebx, eax
mov eax, edx
push eax
push ebx
push ecx
push edi
mov dword [esp + 0x64], ebx
mov dword [esp + 0x60], eax
call fcn.1013be40
mov edx, eax
xor ecx, ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x24], ecx
lea eax, [edx + 0x21]
shr eax, 0xc
mov dword [esp + 0x30], eax
nop dword [eax + eax]
mov ebx, ecx
shl ebx, 0xc
lea eax, [ebx + 0xfde]
cmp dword [esp + 0x3c], eax
cmovae edx, eax
mov dword [esp + 0x20], edx
test ecx, ecx
jne 0x100316c4
mov dword [esp + 0x10], 1
jmp 0x100316cb
add ebx, 0xffffffdf
mov dword [esp + 0x10], ebx
lea eax, [esi + 0x20]
mov dword [esp + 0x1c], eax
cmp dword [esi + 0x18], ecx
jle 0x100316fb
mov eax, dword [eax]
lea edi, [ecx*4]
mov dword [esp + 0x2c], edi
mov eax, dword [edi + eax]
mov dword [esp + 0x14], eax
mov dword [esp + 0x34], eax
test eax, eax
je 0x100316fb
mov ecx, dword [esp + 0x1c]
xor edi, edi
jmp 0x10031729
lea eax, [esp + 0x34]
mov edx, ecx
push eax
mov ecx, esi
call fcn.10030f60
mov ecx, dword [esp + 0x20]
mov edi, eax
mov eax, dword [esp + 0x28]
add esp, 4
shl eax, 2
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
test eax, eax
je 0x10031869
mov ebx, dword [esp + 0x2c]
mov eax, dword [ecx]
mov edx, dword [esp + 0x38]
mov dword [ebx + eax], edx
mov ebx, dword [esp + 0x10]
cmp ebx, dword [esp + 0x20]
ja 0x1003180b
nop dword [eax]
push dword [esp + 0x50]
mov edi, dword [esi + 8]
push dword [esp + 0x58]
mov eax, dword [esp + 0x18]
dec eax
mov ebx, dword [edi]
push 0
push eax
call fcn.1013bfb0
add eax, 0x20
adc edx, 0
push edx
push eax
push dword [esp + 0x60]
mov eax, dword [ebx + 8]
push dword [esp + 0x34]
push edi
call eax
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x10031803
push dword [esp + 0x28]
lea eax, [esp + 0x68]
mov ecx, esi
push dword [esp + 0x60]
lea edx, [esp + 0x68]
push eax
call fcn.100311e0
mov ebx, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
je 0x10031807
push dword [esp + 0x60]
mov edx, ebx
mov ecx, esi
call fcn.10031340
mov edi, eax
add esp, 4
test edi, edi
jne 0x10031807
mov eax, dword [esp + 0x64]
test eax, eax
je 0x100317f2
mov dword [esi + 0x48], eax
mov eax, dword [esp + 0x68]
mov ecx, eax
and eax, 0xff00
sar ecx, 0x10
or ecx, eax
mov dword [esi + 0x44], ebx
mov word [esi + 0x42], cx
mov eax, dword [esi + 0x4c]
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x50]
mov dword [esp + 0x44], eax
inc ebx
mov dword [esp + 0x10], ebx
cmp ebx, dword [esp + 0x20]
jbe 0x10031750
jmp 0x10031807
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
mov dword [edx + eax], ecx
xor ecx, ecx
mov edx, dword [esp + 0x24]
mov eax, 0x88
test edx, edx
mov edx, 0x7f78
cmove ecx, eax
mov eax, 0x8000
cmove eax, edx
push eax
mov eax, dword [esp + 0x3c]
add eax, ecx
push eax
mov eax, dword [esp + 0x1c]
add eax, ecx
push eax
call fcn.1012bec0
add esp, 0xc
cmp ebx, dword [esp + 0x20]
jbe 0x10031869
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
inc ecx
mov dword [esp + 0x24], ecx
cmp ecx, dword [esp + 0x30]
jbe 0x100316a0
cmp dword [0x10165af8], 0
je 0x100318bb
mov eax, dword [0x10168b40]
test eax, eax
je 0x10031885
push eax
call dword [0x10165b48]
add esp, 4
mov ebx, dword [esp + 0x28]
push ebx
call dword [0x10165b24]
sub dword [0x101689c8], eax
add esp, 4
dec dword [0x101689ec]
push ebx
call dword [0x10165b1c]
mov eax, dword [0x10168b40]
add esp, 4
test eax, eax
je 0x100318c8
push eax
call dword [0x10165b50]
jmp 0x100318c5
push dword [esp + 0x28]
call dword [0x10165b1c]
add esp, 4
test edi, edi
jne 0x100319b3
mov eax, dword [esp + 0x40]
mov ecx, esi
mov dword [esi + 0x4c], eax
mov eax, dword [esp + 0x44]
mov dword [esi + 0x50], eax
call fcn.10031150
mov eax, dword [esi + 0x20]
mov ebx, 1
mov ecx, dword [eax]
add ecx, 0x60
mov dword [esp + 0x14], ecx
mov dword [ecx], 0
mov eax, dword [esi + 0x44]
mov dword [ecx + 0x20], eax
mov dword [ecx + 4], 0
nop dword [eax]
cmp byte [esi + 0x2b], 0
lea edx, [ebx + 3]
mov dword [esp + 0x30], edx
je 0x1003192b
xor edi, edi
jmp 0x1003194c
mov edi, 7
jmp 0x100319b3
mov ecx, dword [esi + 4]
push 0xa
push 1
push edx
mov eax, dword [ecx]
push ecx
mov eax, dword [eax + 0x38]
call eax
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x10031982
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x14]
cmp ebx, 1
jne 0x1003195f
cmp dword [esi + 0x44], 0
je 0x1003195f
mov eax, dword [esi + 0x44]
mov dword [ecx + 8], eax
jmp 0x10031967
mov dword [ecx + ebx*4 + 4], 0xffffffff
cmp byte [esi + 0x2b], 0
jne 0x1003198b
mov eax, dword [esi + 4]
push 9
push 1
push edx
mov ecx, dword [eax]
push eax
mov eax, dword [ecx + 0x38]
call eax
add esp, 0x10
jmp 0x10031987
cmp edi, 5
jne 0x100319b3
mov ecx, dword [esp + 0x14]
inc ebx
cmp ebx, 5
jl 0x10031910
cmp dword [esi + 0x48], 0
je 0x100319b3
push dword [esi + 0x6c]
push dword [esi + 0x44]
push str.recovered__d_frames_from_WAL_file__s
push 0x11b
call fcn.10021520
add esp, 0x10
mov ebx, dword [esp + 0x18]
cmp byte [esi + 0x2b], 0
jne 0x100319d6
mov eax, dword [esi + 4]
mov edx, 3
push 9
sub edx, ebx
push edx
mov ecx, dword [eax]
push ebx
push eax
mov eax, dword [ecx + 0x38]
call eax
add esp, 0x10
mov eax, edi
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10129131
mov esp, ebp
pop ebp
ret