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

Disassembly:
push 0xffffffffffffffff
push 0x7cd630
mov eax, dword fs:[0]
push eax
sub esp, 0x88
push ebx
push ebp
push esi
push edi
mov eax, dword [0x89b044]
xor eax, esp
push eax
lea eax, [esp + 0x9c]
mov dword fs:[0], eax
mov esi, ecx
add dword [esi + 0x4c], 2
mov eax, dword [esi + 0x4c]
cmp eax, dword [esi + 0x48]
jne 0x787a49
mov edx, dword [str.Character_set_declaration_starting_with___terminated_prematurely___either_no___was_found_or_the_set_had_no_content.]
xor ebx, ebx
mov ebp, 0xf
mov eax, edx
mov dword [esp + 0x40], ebp
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
lea edi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x7879e0
sub eax, edi
push eax
push edx
lea ecx, [esp + 0x30]
call fcn.00406a70
mov edi, dword [esi + 0x4c]
sub edi, dword [esi + 0x44]
lea eax, [esp + 0x28]
sar edi, 1
push edi
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x34], esp
push 0xffffffffffffffff
push ebx
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push eax
mov dword [esp + 0xd0], ebx
mov byte [ecx + 4], 0
call fcn.004071b0
push edi
push 7
mov ecx, esi
call fcn.00776410
cmp dword [esp + 0x40], 0x10
jb 0x787a42
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00704960
add esp, 4
xor al, al
jmp 0x787bf6
lea ecx, [esp + 0x44]
call fcn.00781f00
mov eax, dword [esi + 0x4c]
mov dword [esp + 0xa4], 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
cmp eax, dword [esi + 0x48]
je 0x787be2
mov edx, dword [esi + 4]
mov eax, dword [edx]
mov ecx, dword [esi + 0x4c]
movzx edx, word [ecx]
lea edi, [eax + 4]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, edi
mov dword [esp + 0x24], edx
call fcn.00773b60
mov ebp, dword [esp + 0x20]
mov ebx, dword [edi + 0x18]
mov edi, dword [edi]
test ebp, ebp
je 0x787aa5
cmp ebp, edi
je 0x787aaa
call fcn.0071ffb6
mov edi, dword [esp + 0x24]
cmp edi, ebx
jne 0x787ab6
xor eax, eax
jmp 0x787acd
test ebp, ebp
jne 0x787ae3
call fcn.0071ffb6
cmp edi, dword [ebp + 0x18]
jne 0x787ac9
call fcn.0071ffb6
movzx eax, byte [edi + 0xe]
movzx eax, al
add eax, 0xfffffffc
cmp eax, 8
ja case.0x787adc.5
jmp dword [eax*4 + 0x787c58]
mov ebp, dword [ebp]
jmp 0x787abf
mov eax, dword [esi + 0x4c]
cmp eax, dword [esp + 0x14]
jne 0x787bc3
add eax, 2
mov byte [esp + 0x74], 1
mov dword [esi + 0x4c], eax
mov dword [esp + 0x18], eax
jmp 0x787bd6
mov eax, dword [esp + 0x18]
cmp dword [esi + 0x4c], eax
jne 0x787c10
lea ecx, [esp + 0x44]
push ecx
jmp 0x787bcf
lea edx, [esp + 0x44]
push edx
mov ecx, esi
call fcn.00782250
test al, al
jne 0x787bd6
lea ecx, [esp + 0x44]
call fcn.0077a5a0
mov al, 1
jmp 0x787bf6
mov ecx, dword [esi + 4]
mov edi, 2
add dword [esi + 0x4c], edi
mov eax, dword [esi + 0x4c]
movzx eax, word [eax]
mov ecx, dword [ecx]
push eax
call fcn.00773dd0
mov ecx, dword [esi + 4]
mov ecx, dword [ecx]
cmp al, 0x16
jne 0x787b88
mov eax, dword [esi + 0x4c]
lea edx, [eax + 2]
push edx
push eax
call fcn.00779c30
test eax, eax
je 0x787bbf
or dword [esp + 0x78], eax
add dword [esi + 0x4c], edi
mov byte [esp + 0x80], 0
jmp 0x787bd6
mov edx, dword [esi + 0x4c]
movzx eax, word [edx]
push eax
call fcn.00773dd0
cmp al, 0x17
jne 0x787bbf
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 4]
mov ecx, dword [ecx]
lea edx, [eax + 2]
push edx
push eax
call fcn.00779c30
test eax, eax
je 0x787bbf
or dword [esp + 0x7c], eax
add dword [esi + 0x4c], edi
mov byte [esp + 0x80], 0
jmp 0x787bd6
add dword [esi + 0x4c], 0xfffffffe
lea edx, [esp + 0x44]
push edx
jmp 0x787bcf
lea eax, [esp + 0x44]
push eax
mov ecx, esi
call fcn.00782150
mov ecx, dword [esi + 0x4c]
cmp ecx, dword [esi + 0x48]
jne 0x787a71
mov edx, dword [esi + 0x4c]
cmp edx, dword [esi + 0x48]
lea ecx, [esp + 0x44]
setne bl
call fcn.0077a5a0
mov al, bl
mov ecx, dword [esp + 0x9c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret
add dword [esi + 0x4c], 2
cmp byte [esp + 0x75], 0
push 0
mov ecx, esi
je 0x787c26
lea edx, [esp + 0x48]
push edx
jmp 0x787c2b
lea eax, [esp + 0x48]
push eax
call fcn.0077e540
test eax, eax
jne 0x787b34
mov ecx, dword [esi + 0x4c]
sub ecx, dword [esi + 0x44]
sar ecx, 1
push ecx
push 4
mov ecx, esi
call fcn.00779640
lea ecx, [esp + 0x44]
call fcn.0077a5a0
xor al, al
jmp 0x787bf6