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

Disassembly:
sub esp, 0x68
mov eax, dword [0x10104008]
xor eax, esp
mov dword [esp + 0x64], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x78]
mov ebp, edx
mov dword [esp + 0x1c], ecx
mov ecx, 0x101080ea
push edi
mov dword [esp + 0x2c], esi
call fcn.100de193
cmp word [ebp + 0x18], 0
mov eax, dword [ebp + 0x34]
mov dword [esp + 0x24], eax
jne 0x10058a8e
push 0x100f9e64
push 0x116c8
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10042300
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.100dcb60
add esp, 0x68
ret
push 0
lea ecx, [esp + 0x2c]
push 0
push ecx
lea edx, [esp + 0x20]
mov ecx, eax
call fcn.10056f80
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x10058c3e
mov eax, dword [ebp + 0x24]
add esi, 4
push eax
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x4c]
push ebp
call eax
mov edi, dword [esp + 0x1c]
lea edx, [ebx + 0xd]
movzx eax, ax
mov ecx, edi
mov dword [esp + 0x24], eax
call fcn.10053230
lea eax, [esp + 0x20]
mov dword [esp + 0x38], 1
mov dword [esp + 0x40], eax
lea ecx, [esp + 0x38]
lea eax, [esp + 0x24]
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x44], eax
xor edx, edx
mov eax, dword [ebp + 0x3c]
push edi
push 1
mov dword [esp + 0x50], eax
mov dword [esp + 0x68], 2
call fcn.100582e0
mov ebx, eax
add esp, 0x10
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x10058b28
test edi, edi
je 0x10058c3e
jmp 0x10058c16
mov ecx, dword [esp + 0x24]
movzx eax, word [edi + 0x12]
mov ecx, dword [ecx + 0x24]
sub ecx, eax
movzx eax, word [esp + 0x1c]
sub ecx, eax
mov eax, dword [esp + 0x24]
sub ecx, 2
mov dword [edi + 0x14], ecx
cmp byte [eax + 0x11], 0
je 0x10058b8c
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x24]
push dword [ecx + 4]
mov ecx, eax
push 5
call fcn.10051e10
mov ax, word [esp + 0x28]
add esp, 0xc
cmp ax, word [edi + 0x10]
jbe 0x10058b88
lea eax, [esp + 0x14]
mov edx, edi
push eax
push dword [esp + 0x1c]
mov ecx, edi
call fcn.100523c0
add esp, 8
mov ebx, dword [esp + 0x14]
movzx ecx, word [ebp + 0x18]
mov eax, dword [ebp + 0x40]
mov ax, word [eax + ecx*2 - 2]
mov ch, al
mov cl, ah
movzx eax, word [ebp + 0x1a]
movzx ecx, cx
and ecx, eax
add ecx, dword [ebp + 0x38]
mov dword [esp + 0x18], ecx
lea edx, [ecx + 9]
nop
mov al, byte [ecx]
inc ecx
mov dword [esp + 0x18], ecx
test al, al
jns 0x10058bbf
cmp ecx, edx
jb 0x10058bb0
lea edx, [ecx + 9]
mov al, byte [ecx]
inc ecx
mov byte [esi], al
inc esi
mov dword [esp + 0x18], ecx
test al, al
jns 0x10058bd4
cmp ecx, edx
jb 0x10058bc2
test ebx, ebx
jne 0x10058c01
lea eax, [esp + 0x14]
push eax
push dword [ebp + 4]
mov eax, dword [esp + 0x34]
sub esi, eax
mov ebp, dword [esp + 0x28]
mov ecx, ebp
push ebx
push esi
push eax
movzx edx, word [ebp + 0x18]
call fcn.10058000
mov ebx, dword [esp + 0x28]
add esp, 0x14
jmp 0x10058c05
mov ebp, dword [esp + 0x20]
movzx ecx, byte [ebp + 9]
mov eax, dword [ebp + 0x38]
mov edx, dword [esp + 0x28]
bswap edx
mov dword [ecx + eax + 8], edx
mov ecx, dword [edi + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x10058c39
call fcn.1004c0e0
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.100dcb60
add esp, 0x68
ret
call fcn.10048660
mov ecx, dword [esp + 0x74]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100dcb60
add esp, 0x68
ret