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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov ecx, dword [ebp + 0x14]
xor eax, eax
push ebx
mov ebx, dword [ebp + 8]
mov edx, ecx
push esi
push edi
mov edi, dword [ebp + 0xc]
and edx, 1
xor esi, esi
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
cmp edi, 1
je 0x595942
cmp byte [ebx + 0x16], al
je 0x595942
cmp byte [ebx + 0x10], 1
je 0x595939
test cl, 2
je 0x595942
mov dword [ebp - 0x10], 1
jmp 0x595945
mov dword [ebp - 0x10], eax
test edi, edi
jne 0x59596c
push 0x68a82c
push 0xb9f7
push str.database_corruption_at_line__d_of___.10s_
push 0xb
call fcn.0055bef0
add esp, 0x10
lea eax, [edi + 0xb]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x28]
mov byte [ebx + 0x17], 1
test ecx, ecx
je 0x59597e
mov esi, ecx
jmp 0x595bfa
cmp dword [ebp - 0x10], eax
je 0x595b18
mov eax, dword [ebx + 0xd0]
test eax, eax
je 0x5959b2
lea ecx, [ebp - 8]
push ecx
push edi
push eax
call fcn.005b2510
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x595d4c
cmp dword [ebp - 8], eax
jne 0x595b18
mov eax, dword [ebx + 0x98]
lea edx, [ebp + 0x14]
mov esi, dword [ebx + 0x3c]
lea ecx, [edi - 1]
push edx
push eax
push 0
cdq
push ecx
push edx
mov dword [ebp + 0x14], 0
mov edi, dword [esi]
push eax
mov dword [ebp - 0x14], ecx
call fcn.005ea7b0
push edx
push eax
mov eax, dword [edi + 0x44]
push esi
call eax
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x595d4c
mov eax, dword [ebp + 0x14]
mov dword [ebp - 4], eax
test eax, eax
je 0x595b15
cmp byte [ebx + 0x10], 1
jbe 0x595a44
push dword [ebp + 0xc]
push ebx
call fcn.00596290
mov edi, eax
add esp, 8
test edi, edi
je 0x595a3c
push dword [ebp + 0x14]
mov eax, dword [ebx + 0x98]
push esi
push dword [ebp - 0x14]
cdq
push edx
push eax
call fcn.005ea7b0
push edx
push eax
push dword [ebx + 0x3c]
call fcn.005957f0
add esp, 0x10
jmp 0x595afb
mov esi, dword [ebp + 0x14]
mov dword [ebp - 4], esi
jmp 0x595a46
mov esi, eax
mov edi, dword [ebx + 0x88]
test edi, edi
je 0x595a77
mov eax, dword [edi + 0xc]
mov dword [ebx + 0x88], eax
mov dword [edi + 0xc], 0
movzx eax, word [ebx + 0x8c]
push eax
push 0
push dword [edi + 8]
call fcn.00607da0
add esp, 0xc
jmp 0x595aed
movzx eax, word [ebx + 0x8c]
cdq
add eax, 0x28
mov dword [ebp - 0x18], eax
adc edx, 0
push edx
push eax
call fcn.005949e0
mov edi, eax
add esp, 8
mov dword [ebp - 0x1c], edi
test edi, edi
je 0x595aad
push dword [ebp - 0x18]
push 0
push edi
call fcn.00607da0
add esp, 0xc
test edi, edi
jne 0x595add
push dword [ebp - 4]
mov eax, dword [ebx + 0x98]
mov esi, dword [ebx + 0x3c]
push 0
push dword [ebp - 0x14]
cdq
mov edi, dword [esi]
push edx
push eax
call fcn.005ea7b0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov edi, dword [ebp - 0x1c]
add esp, 0x10
mov esi, 7
jmp 0x595afb
lea eax, [edi + 0x28]
mov dword [edi + 0x18], 0x10040
mov dword [edi + 8], eax
mov dword [edi + 0x10], ebx
mov eax, dword [ebp + 0xc]
mov dword [edi + 4], esi
mov dword [edi + 0x14], eax
inc dword [ebx + 0x78]
xor esi, esi
test edi, edi
je 0x595b0d
mov eax, dword [ebp + 0x10]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x595d4c
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebx + 0xcc]
movzx eax, byte [ecx + 0x1d]
and eax, 3
push eax
push edi
push dword [ecx + 0x28]
call dword [0x6ebe1c]
add esp, 0xc
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x595bdf
mov eax, dword [ebx + 0xcc]
mov dword [ebp + 0xc], eax
cmp byte [eax + 0x1d], 2
je 0x595bcc
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x595b68
cmp word [ecx + 0x1a], 0
jne 0x595b61
test byte [ecx + 0x18], 8
je 0x595b68
mov ecx, dword [ecx + 0x24]
test ecx, ecx
jne 0x595b54
mov dword [eax + 8], ecx
test ecx, ecx
jne 0x595b86
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x595ba5
cmp word [ecx + 0x1a], 0
je 0x595b86
mov ecx, dword [ecx + 0x24]
test ecx, ecx
jne 0x595b76
jmp 0x595ba5
push ecx
push dword [eax + 0x24]
mov eax, dword [eax + 0x20]
call eax
mov esi, eax
add esp, 8
test esi, esi
je 0x595ba2
cmp esi, 5
je 0x595ba2
mov eax, dword [ebp - 0x1c]
jmp 0x595bc0
mov eax, dword [ebp + 0xc]
push 2
push edi
push dword [eax + 0x28]
call dword [0x6ebe1c]
xor esi, esi
add esp, 0xc
test eax, eax
mov ecx, 7
cmove esi, ecx
test esi, esi
jne 0x595d4c
test eax, eax
jne 0x595bdf
mov edi, dword [ebp + 0x10]
mov esi, 7
mov dword [edi], 0
jmp 0x595d4f
push eax
push edi
push dword [ebx + 0xcc]
call fcn.00597e80
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov edx, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov dword [ecx], eax
test esi, esi
jne 0x595d4c
cmp dword [eax + 0x10], esi
je 0x595c1a
test edx, edx
jne 0x595c1a
inc dword [ebx + 0xb8]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [eax + 0x10], ebx
cmp edi, 0x7fffffff
ja 0x595d01
mov eax, dword [0x6ebea8]
cdq
idiv dword [ebx + 0x98]
inc eax
cmp edi, eax
je 0x595d01
cmp byte [ebx + 0xf], 0
mov ecx, dword [ebp - 0xc]
jne 0x595c9e
cmp dword [ebx + 0x18], edi
jb 0x595c9e
test ecx, ecx
jne 0x595c9e
mov eax, dword [ebx + 0x3c]
cmp dword [eax], ecx
je 0x595c9e
mov eax, dword [ebx + 0xd0]
test eax, eax
je 0x595c7e
cmp dword [ebp - 0x10], ecx
jne 0x595c7e
lea ecx, [ebp - 8]
push ecx
push edi
push eax
call fcn.005b2510
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x595d1f
push dword [ebp - 8]
mov edi, dword [ebp - 4]
inc dword [ebx + 0xbc]
push edi
call fcn.00579c50
mov esi, eax
add esp, 8
test esi, esi
je 0x595cf8
jmp 0x595d22
cmp edi, dword [ebx + 0x9c]
jbe 0x595cad
mov esi, 0xd
jmp 0x595d1f
test ecx, ecx
je 0x595ce2
mov eax, dword [0x6f2e40]
test eax, eax
je 0x595cbc
call eax
cmp edi, dword [ebx + 0x1c]
ja 0x595ccd
push edi
push dword [ebx + 0x38]
call fcn.00581460
add esp, 8
push edi
push ebx
call fcn.0055f2e0
mov eax, dword [0x6f2e44]
add esp, 8
test eax, eax
je 0x595ce2
call eax
push dword [ebx + 0x98]
mov edi, dword [ebp - 4]
push 0
push dword [edi + 4]
call fcn.00607da0
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0x68a82c
push 0xba4c
push str.database_corruption_at_line__d_of___.10s_
push 0xb
call fcn.0055bef0
add esp, 0x10
mov esi, 0xb
mov edi, dword [ebp - 4]
test byte [edi + 0x18], 2
je 0x595d33
push 1
push edi
call fcn.005793a0
add esp, 8
mov eax, dword [edi + 0x1c]
push 1
dec dword [eax + 0xc]
mov eax, dword [edi + 0x1c]
push dword [edi]
push dword [eax + 0x28]
call dword [0x6ebe20]
add esp, 0xc
mov edi, dword [ebp + 0x10]
cmp dword [ebx + 0x78], 0
jne 0x595d6a
mov eax, dword [ebx + 0xcc]
cmp dword [eax + 0xc], 0
jne 0x595d6a
push ebx
call fcn.00576580
add esp, 4
mov dword [edi], 0
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret