Function at 0x789870
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [eax + 0x38]
movzx esi, word [eax + 0x12]
mov dword [esp + 0x24], eax
movzx eax, word [eax + 0x18]
mov dword [esp + 0x14], ebx
lea ecx, [esi + eax*2]
mov dword [esp + 0x10], ecx
mov ecx, dword [edi + 0x34]
movzx edi, byte [edi + 9]
mov ecx, dword [ecx + 0x24]
mov dword [esp + 0x38], edi
mov dword [esp + 0x28], ecx
lea ecx, [ebx + edi + 7]
mov dword [esp + 0x3c], ecx
movzx ecx, byte [ecx]
cmp ecx, edx
jg 0x789910
movzx edx, byte [ebx + edi + 1]
movzx ecx, byte [ebx + edi + 2]
shl edx, 8
or edx, ecx
mov ecx, dword [esp + 0x28]
mov ebp, edx
lea edx, [ecx - 3]
cmp edx, ebp
jle 0x789b24
test ebp, ebp
je 0x789910
mov ebx, dword [esp + 0x14]
movzx ecx, byte [ebx + ebp]
movzx ebx, byte [ebx + ebp + 1]
shl ecx, 8
or ebx, ecx
cmp edx, ebx
jle 0x789c97
test ebx, ebx
je 0x789b41
mov edx, dword [esp + 0x14]
cmp byte [edx + ebx], 0
je 0x789b36
lea esi, [esi]
nop
mov edx, dword [esp + 0x28]
lea edi, [edx - 4]
mov dword [esp + 0x34], edi
test eax, eax
je 0x789a9e
mov edx, dword [esp + 0x14]
lea ecx, [edx + esi]
movzx ebx, word [ecx]
rol bx, 8
movzx ebx, bx
cmp edi, ebx
jl 0x789b00
cmp dword [esp + 0x10], ebx
jg 0x789b00
lea ebp, [edx + esi + 2]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x28]
lea eax, [ecx + eax*2]
mov dword [esp + 0x30], eax
mov dword [esp + 0xc], edx
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], ecx
jmp 0x7899b8
mov eax, dword [esp + 0x14]
sub esp, 4
push esi
add eax, edi
push ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x10
cmp dword [esp + 0x30], ebp
je 0x789aa2
movzx ebx, word [ebp]
mov dword [esp + 0x1c], ebp
add ebp, 2
mov dword [esp + 0xc], edi
rol bx, 8
movzx ebx, bx
cmp dword [esp + 0x10], ebx
jg 0x789b00
cmp dword [esp + 0x34], ebx
jl 0x789b00
mov eax, dword [esp + 0x2c]
sub esp, 8
lea ecx, [eax + ebx]
push ecx
mov eax, dword [esp + 0x30]
mov dword [esp + 0x24], ecx
push eax
call dword [eax + 0x4c]
mov edi, dword [esp + 0x1c]
movzx esi, ax
add esp, 0x10
sub edi, esi
cmp dword [esp + 0x10], edi
jg 0x789a70
lea eax, [esi + ebx]
cmp eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
jg 0x789a70
mov eax, edi
mov edx, dword [esp + 0x1c]
rol ax, 8
mov word [edx], ax
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x789970
cmp edi, ebx
je 0x789984
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
sub esp, 4
mov eax, dword [eax + 0x34]
mov eax, dword [eax]
mov ecx, dword [eax + 0xd0]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x3c]
movzx eax, byte [edx + ecx + 5]
movzx edx, byte [edx + ecx + 6]
mov ecx, dword [esp + 0x24]
shl eax, 8
or eax, edx
lea edx, [ecx + eax]
mov ecx, dword [esp + 0x10]
sub ecx, eax
add eax, dword [esp + 0x18]
push ecx
push eax
push edx
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x30]
add esp, 0x10
lea ecx, [eax + ebx]
mov dword [esp + 0x2c], eax
jmp 0x789970
sub esp, 0xc
push 0xbeb7d8
push 0x10039
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.00787f60
add esp, 0x20
mov eax, 0xb
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x3c]
mov byte [eax], 0
mov eax, edi
mov esi, dword [esp + 0x24]
sub eax, dword [esp + 0x10]
cmp eax, dword [esi + 0x14]
jne 0x789b12
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x38]
mov eax, edi
sub esp, 4
mov byte [esi + edx + 5], ah
mov byte [esi + edx + 6], al
mov eax, esi
mov esi, dword [esp + 0x14]
mov byte [eax + edx + 1], 0
mov byte [eax + edx + 2], 0
sub edi, esi
add eax, esi
push edi
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0x10
xor eax, eax
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push 0xbeb7d8
push 0x10033
jmp 0x789a7d
sub esp, 0xc
push 0xbeb7d8
push 0x1004e
jmp 0x789a7d
sub esp, 0xc
push 0xbeb7d8
push 0x10003
jmp 0x789a7d
cmp byte [edx + ebx + 1], 0
jne 0x789910
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + ebp + 2]
movzx edx, byte [ecx + ebp + 3]
shl eax, 8
or eax, edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x18], eax
movzx eax, byte [ecx + edx + 5]
movzx edx, byte [ecx + edx + 6]
shl eax, 8
or edx, eax
cmp ebp, edx
jle 0x789ccd
mov eax, dword [esp + 0x18]
lea ecx, [ebp + eax]
test ebx, ebx
je 0x789c61
cmp ebx, ecx
jl 0x789ca9
mov edi, dword [esp + 0x14]
movzx eax, byte [edi + ebx + 2]
movzx edi, byte [edi + ebx + 3]
shl eax, 8
or eax, edi
mov dword [esp + 0xc], eax
add eax, ebx
cmp eax, dword [esp + 0x28]
jg 0x789cbb
mov eax, ebx
mov dword [esp + 0x1c], edx
sub esp, 4
sub eax, ecx
push eax
mov edx, dword [esp + 0x1c]
lea eax, [edx + ecx]
push eax
mov edi, dword [esp + 0x18]
lea eax, [edi + ecx]
add eax, edx
push eax
call sub.msvcrt.dll_memmove
add dword [esp + 0x28], edi
add esp, 0x10
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
sub esp, 4
mov edi, dword [esp + 0x1c]
add eax, ecx
mov dword [esp + 0x20], eax
mov eax, ebp
add edi, edx
sub eax, edx
push eax
lea eax, [ecx + edx]
push eax
lea eax, [ecx + edi]
mov dword [esp + 0x20], ecx
push eax
call sub.msvcrt.dll_memmove
mov ecx, dword [esp + 0x24]
add esp, 0x10
lea edx, [ecx + esi]
cmp dword [esp + 0x1c], edx
jbe 0x789c89
mov esi, dword [esp + 0x18]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x1c]
jmp 0x789c40
add ecx, esi
add eax, esi
mov byte [edx], ch
mov byte [edx + 1], al
add edx, 2
cmp edi, edx
jbe 0x789c85
movzx eax, word [edx]
rol ax, 8
movzx ecx, ax
cmp ebp, ecx
jg 0x789c30
cmp ebx, ecx
jle 0x789c39
add ecx, dword [esp + 0xc]
add al, byte [esp + 0xc]
mov byte [edx], ch
mov byte [edx + 1], al
jmp 0x789c39
mov dword [esp + 0xc], 0
cmp dword [esp + 0x28], ecx
jge 0x789bdc
sub esp, 0xc
push 0xbeb7d8
push 0x10017
jmp 0x789a7d
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x3c]
movzx eax, byte [eax]
add eax, edi
jmp 0x789aab
sub esp, 0xc
push 0xbeb7d8
push 0x10006
jmp 0x789a7d
sub esp, 0xc
push 0xbeb7d8
push 0x10011
jmp 0x789a7d
sub esp, 0xc
push 0xbeb7d8
push 0x10013
jmp 0x789a7d
sub esp, 0xc
push 0xbeb7d8
push 0x1000e
jmp 0x789a7d