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

Disassembly:
sub esp, 0x58
push ebx
push ebp
push esi
mov esi, dword [esp + 0x68]
push edi
xor edi, edi
push 0x1f0
push esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], edi
call fcn.007720f0
mov ebx, dword [esp + 0x7c]
mov ebp, eax
mov dword [ebp], esi
mov esi, dword [esp + 0x78]
push edi
push esi
mov word [ebp + 0x14], bx
mov byte [ebp + 0xad], 0
mov byte [ebp + 0xac], 0
mov dword [ebp + 0xf8], edi
mov dword [ebp + 4], esi
mov dword [ebp + 0x30], edi
mov dword [ebp + 0x120], edi
call fcn.00771ec0
push 0xa
lea eax, [esp + 0x44]
push eax
push esi
call fcn.00771d20
mov al, byte [esp + 0x4c]
add esp, 0x1c
cmp al, 0x50
jne 0x780b1f
cmp byte [esp + 0x31], 0x46
jne 0x780b1f
cmp byte [esp + 0x32], 0x52
jne 0x780b1f
mov ax, word [esp + 0x38]
movzx cx, al
movzx dx, ah
push edi
push esi
shl ecx, 8
add ecx, edx
mov word [ebp + 0xa2], cx
movzx ax, byte [esp + 0x3c]
movzx cx, byte [esp + 0x3d]
shl eax, 8
add eax, ecx
mov word [ebp + 0xa4], ax
mov dl, byte [esp + 0x3b]
sub dl, 0x30
mov byte [ebp + 8], dl
call fcn.00771ec0
push 0x2b
lea eax, [esp + 0x48]
push eax
push esi
call fcn.00771d20
mov cl, byte [esp + 0x7a]
mov byte [ebp + 0x36], cl
movzx dx, byte [esp + 0x66]
movzx ax, byte [esp + 0x67]
movzx ecx, byte [esp + 0x79]
shl edx, 8
shl ecx, 0x10
add edx, eax
movzx eax, dx
movzx dx, byte [esp + 0x5d]
add eax, ecx
movzx cx, byte [esp + 0x5c]
mov dword [esp + 0x88], eax
movzx eax, byte [esp + 0x73]
shl eax, 8
shl ecx, 8
add ecx, edx
movzx edx, byte [esp + 0x74]
add eax, edx
movzx edx, byte [esp + 0x75]
shl eax, 8
add eax, edx
mov dword [ebp + 0x2c], eax
movzx eax, byte [esp + 0x70]
movzx edx, byte [esp + 0x71]
shl eax, 8
add eax, edx
movzx edx, byte [esp + 0x72]
shl eax, 8
add eax, edx
mov dword [ebp + 0x30], eax
movzx eax, cx
push eax
push esi
call fcn.00771ec0
push esi
call fcn.00771d00
push esi
mov edi, eax
call fcn.00771ed0
lea ecx, [ebx + ebx*4]
add eax, ecx
push eax
push esi
call fcn.00771ec0
push esi
call fcn.00771ed0
add eax, 2
push eax
push esi
call fcn.00771ec0
push 3
lea edx, [esp + 0x64]
push edx
push esi
call fcn.00771d20
movzx eax, byte [esp + 0x6c]
add esp, 0x44
shl eax, 8
mov ecx, dword [esp + 0x29]
movzx edx, cl
add eax, edx
movzx ecx, ch
shl eax, 8
add eax, ecx
movzx edx, di
push eax
push esi
mov dword [esp + 0x74], eax
mov dword [ebp + 0x10], edx
call fcn.00771ec0
push 3
lea eax, [esp + 0x34]
push eax
push esi
call fcn.00771d20
mov ecx, dword [esp + 0x3d]
movsx eax, byte [esp + 0x3c]
movzx edx, cl
shl eax, 8
add eax, edx
movzx ecx, ch
shl eax, 8
push 3
lea edx, [esp + 0x40]
add eax, ecx
push edx
shl eax, 8
push esi
mov dword [ebp + 0xb0], eax
call fcn.00771d20
mov ecx, dword [esp + 0x49]
movsx eax, byte [esp + 0x48]
movzx edx, cl
shl eax, 8
add eax, edx
movzx ecx, ch
shl eax, 8
push 3
lea edx, [esp + 0x4c]
add eax, ecx
push edx
shl eax, 8
push esi
mov dword [ebp + 0xb4], eax
call fcn.00771d20
mov ecx, dword [esp + 0x55]
movsx eax, byte [esp + 0x54]
movzx edx, cl
shl eax, 8
add eax, edx
movzx ecx, ch
shl eax, 8
push 3
lea edx, [esp + 0x58]
add eax, ecx
push edx
shl eax, 8
push esi
mov dword [ebp + 0xb8], eax
call fcn.00771d20
mov ecx, dword [esp + 0x61]
movsx eax, byte [esp + 0x60]
shl eax, 8
movzx edx, cl
add eax, edx
shl eax, 8
movzx ecx, ch
add eax, ecx
shl eax, 8
add esp, 0x38
test eax, eax
mov dword [ebp + 0xbc], eax
jge 0x7802c7
neg eax
mov dword [ebp + 0xbc], eax
mov edi, dword [ebp + 0xb0]
xor ebx, ebx
cmp edi, ebx
mov dword [ebp + 0xc0], ebx
mov dword [ebp + 0xc4], ebx
mov edx, edi
jge 0x7802e3
neg edx
mov eax, dword [ebp + 0xb4]
cmp eax, ebx
mov ecx, eax
jge 0x7802f1
neg ecx
cmp edx, ecx
jle 0x7802fd
cmp edi, ebx
jge 0x780305
neg edi
jmp 0x780305
cmp eax, ebx
jge 0x780303
neg eax
mov edi, eax
mov ecx, dword [ebp + 0xb8]
cmp ecx, ebx
mov ebx, ecx
jge 0x780313
neg ebx
mov eax, dword [ebp + 0xbc]
test eax, eax
mov edx, eax
jge 0x780321
neg edx
cmp ebx, edx
jle 0x78032f
test ecx, ecx
jge 0x78032b
neg ecx
mov eax, ecx
jmp 0x780335
test eax, eax
jge 0x780335
neg eax
cmp edi, eax
mov ebx, edi
jl 0x78033d
mov ebx, eax
mov eax, dword [ebp + 0xb0]
push ebx
push eax
call fcn.00779700
mov edx, dword [ebp + 0xb4]
push ebx
push edx
mov dword [ebp + 0xb0], eax
call fcn.00779700
mov dword [ebp + 0xb4], eax
mov eax, dword [ebp + 0xb8]
push ebx
push eax
call fcn.00779700
mov ecx, dword [ebp + 0xbc]
push ebx
push ecx
mov dword [ebp + 0xb8], eax
call fcn.00779700
mov edx, dword [esp + 0x8c]
add edx, 0xc
push edx
push esi
mov dword [ebp + 0xbc], eax
call fcn.00771ec0
mov eax, dword [esi + 4]
mov edx, dword [esi]
mov bl, byte [edx + eax]
add esp, 0x28
test bl, 4
lea ecx, [eax + 1]
mov dword [esi + 4], ecx
je 0x78046e
test bl, 8
je 0x7803c7
push esi
call fcn.00771d00
add esp, 4
movsx eax, ax
jmp 0x7803cf
movzx eax, byte [ecx + edx]
inc ecx
mov dword [esi + 4], ecx
mov word [ebp + 0xa0], ax
mov eax, dword [esp + 0x10]
test bl, 0x40
mov word [ebp + 0xa6], ax
mov byte [ebp + 0xac], 0
mov byte [ebp + 0xad], 0
je 0x7803f9
call fcn.0077dcf0
push esi
call fcn.00771d00
movzx edi, ax
push 3
lea eax, [esp + 0x30]
push eax
push esi
call fcn.00771d20
mov ecx, dword [esp + 0x39]
movsx eax, byte [esp + 0x38]
shl eax, 8
movzx edx, cl
add eax, edx
shl eax, 8
movzx ecx, ch
add eax, ecx
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x84]
add esp, 0x10
cmp eax, 0x10000
jl 0x78044f
mov eax, dword [esi + 4]
mov edx, dword [esi]
movzx ecx, byte [eax + edx]
shl ecx, 0x10
add edi, ecx
inc eax
mov dword [esi + 4], eax
mov edx, dword [ebp]
push edi
push edx
call fcn.007720f0
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [esp + 0x24], ebx
jne 0x780498
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
test bl, 0x10
je 0x7803d6
test bl, 0x20
je 0x78048a
push esi
call fcn.00771d00
add esp, 4
jmp 0x7803da
movzx ax, byte [ecx + edx]
inc ecx
mov dword [esi + 4], ecx
jmp 0x7803da
mov eax, dword [esp + 0x6c]
push eax
push esi
call fcn.00771ec0
push edi
push ebx
push esi
call fcn.00771d20
movzx cx, byte [ebx]
movzx dx, byte [ebx + 1]
add ebx, 2
add ebx, 2
add ebx, 2
shl ecx, 8
add esp, 0x14
add ecx, edx
mov word [ebp + 0x16], cx
movzx ax, byte [ebx - 4]
movzx cx, byte [ebx - 3]
shl eax, 8
add eax, ecx
mov word [ebp + 0x18], ax
movzx dx, byte [ebx - 2]
movzx ax, byte [ebx - 1]
shl edx, 8
add edx, eax
cmp byte [ebp + 8], 1
mov word [ebp + 0x1a], dx
jbe 0x780501
cmp word [ebp + 0x18], 0x100
jae 0x780501
mov al, 1
jmp 0x780503
xor al, al
movzx ecx, word [ebp + 0x18]
movzx edx, word [ebp + 0x1a]
shl ecx, 0x10
push ecx
shl edx, 0x10
push edx
mov byte [ebp + 0x35], al
call fcn.00779700
xor edi, edi
add esp, 8
mov esi, ebp
mov dword [ebp + 0x28], eax
mov dword [ebp + 0xc8], eax
mov dword [ebp + 0xcc], edi
mov dword [ebp + 0xd0], edi
mov dword [ebp + 0xd4], eax
mov dword [ebp + 0xd8], edi
mov dword [ebp + 0xdc], edi
call fcn.0077e4b0
movzx eax, word [ebp + 0x1a]
mov dword [ebp + 0x10c], eax
movzx cx, byte [ebx]
movzx dx, byte [ebx + 1]
add ebx, 2
add ebx, 2
add ebx, 2
shl ecx, 8
add ebx, 2
add ecx, edx
mov word [ebp + 0x98], cx
movzx ax, byte [ebx - 6]
movzx cx, byte [ebx - 5]
shl eax, 8
add eax, ecx
mov word [ebp + 0x9a], ax
movzx dx, byte [ebx - 4]
movzx ax, byte [ebx - 3]
shl edx, 8
add edx, eax
mov word [ebp + 0x9c], dx
movzx cx, byte [ebx - 2]
movzx dx, byte [ebx - 1]
shl ecx, 8
add ecx, edx
mov word [ebp + 0x9e], cx
mov al, byte [ebx]
mov cl, al
and cl, 1
inc ebx
test al, 4
mov byte [esp + 0x20], al
mov byte [ebp + 0x1c], cl
jne 0x7805e3
movzx cx, byte [ebx]
movzx dx, byte [ebx + 1]
add ebx, 2
shl ecx, 8
add ecx, edx
mov dword [esp + 0x18], ecx
test al, al
mov dword [ebp + 0x128], edi
mov word [ebp + 0x38], di
jns 0x780793
movzx eax, byte [ebx]
inc ebx
test eax, eax
jle 0x780793
mov dword [esp + 0x14], eax
movzx ax, byte [ebx]
inc ebx
mov word [esp + 0x1c], ax
movzx ax, byte [ebx]
inc ebx
cmp ax, 2
jne 0x78065f
mov eax, ebx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x780620
mov ecx, dword [ebp]
sub eax, edx
inc eax
push eax
push ecx
call fcn.007720f0
add esp, 8
test eax, eax
mov dword [ebp + 0xf8], eax
je 0x78077d
mov ecx, ebx
mov edx, eax
lea esp, [esp]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x780650
jmp 0x78077d
cmp ax, 3
jne 0x78077d
mov al, byte [ebx]
movzx eax, al
mov ecx, eax
shr ecx, 4
and eax, 0xf
test ecx, ecx
lea edx, [ebx + 1]
mov dword [esp + 0x74], edx
mov dword [ebp + 0x17c], ecx
mov dword [ebp + 0x180], eax
jle 0x7806fa
mov dword [esp + 0x6c], 0
xor edi, edi
jmp 0x7806a0
mov eax, dword [esp + 0x74]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
add eax, 2
shl ecx, 8
mov dword [esp + 0x74], eax
lea eax, [ecx + edx]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x74]
push edx
mov dword [ebp + edi*4 + 0x1b4], eax
push 1
shl eax, 0x10
mov esi, ebp
call fcn.0077e650
mov eax, dword [esp + 0x7c]
sar eax, 0x10
mov dword [ebp + edi*4 + 0x1b4], eax
mov eax, dword [esp + 0x78]
add esp, 0xc
inc eax
movsx edi, ax
mov dword [esp + 0x6c], eax
cmp edi, dword [ebp + 0x17c]
jl 0x7806a0
mov eax, dword [ebp + 0x180]
test eax, eax
jle 0x78077d
mov ecx, dword [esp + 0x74]
xor edi, edi
dec ecx
mov dword [esp + 0x6c], 0
mov dword [esp + 0x74], ecx
jmp 0x780720
mov eax, dword [esp + 0x74]
movzx edx, byte [eax + 1]
add eax, 2
mov dword [esp + 0x74], eax
movzx eax, byte [eax]
shl edx, 8
add eax, edx
lea ecx, [esp + 0x10]
push ecx
mov dword [ebp + edi*4 + 0x184], eax
lea edx, [esp + 0x74]
shl eax, 0x10
push edx
push eax
mov eax, 1
mov esi, ebp
call fcn.0077e650
mov eax, dword [esp + 0x1c]
sar eax, 0x10
mov dword [ebp + edi*4 + 0x184], eax
mov eax, dword [esp + 0x78]
add esp, 0xc
inc eax
movsx edi, ax
mov dword [esp + 0x6c], eax
cmp edi, dword [ebp + 0x180]
jl 0x780720
movsx ecx, word [esp + 0x1c]
mov eax, dword [esp + 0x14]
add ebx, ecx
dec eax
mov dword [esp + 0x14], eax
jne 0x780605
movzx edx, byte [ebx]
movzx eax, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
add ebx, 3
shl edx, 8
add edx, eax
shl edx, 8
lea eax, [edx + ecx]
test eax, eax
mov dword [ebp + 0x24], eax
je 0x7807da
mov edx, dword [ebp]
push eax
push edx
call fcn.007720f0
mov ecx, dword [ebp + 0x24]
mov dword [ebp + 0x20], eax
mov edi, eax
mov eax, ecx
shr ecx, 2
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
add esp, 8
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x7807e1
mov dword [ebp + 0x20], 0
mov esi, dword [ebp + 0x24]
movzx ax, byte [ebx + esi]
add ebx, esi
movsx eax, ax
inc ebx
test eax, eax
mov dword [ebp + 0x164], eax
jle 0x780875
lea edi, [ebp + 0x12c]
mov dword [esp + 0x6c], eax
movzx ecx, byte [ebx]
movzx edx, byte [ebx + 1]
add ebx, 2
shl ecx, 8
lea eax, [ecx + edx]
mov dword [edi], eax
shl eax, 0x10
mov esi, eax
mov eax, dword [ebp + 0xe8]
push eax
push esi
call fcn.007795d0
mov ecx, dword [ebp + 0xe0]
push ecx
push 1
call fcn.007795d0
mov edx, dword [ebp + 0xec]
push edx
push esi
call fcn.007795d0
mov esi, eax
mov eax, dword [ebp + 0xe4]
push eax
push 1
call fcn.007795d0
add esi, eax
mov eax, dword [ebp + 0xf4]
add eax, esi
sar eax, 0x10
mov dword [edi], eax
mov eax, dword [esp + 0x8c]
add esp, 0x20
add edi, 4
dec eax
mov dword [esp + 0x6c], eax
jne 0x780803
movzx ecx, byte [ebx]
mov edx, dword [ebp + 0xe8]
mov esi, ecx
push edx
shl esi, 0x10
push esi
mov dword [ebp + 0x168], ecx
inc ebx
call fcn.007795d0
mov eax, dword [ebp + 0xe0]
push eax
push 1
call fcn.007795d0
mov ecx, dword [ebp + 0xec]
push ecx
push esi
call fcn.007795d0
mov edx, dword [ebp + 0xe4]
push edx
push 1
mov esi, eax
call fcn.007795d0
mov ecx, dword [ebp + 0xe8]
add esi, eax
mov eax, dword [ebp + 0xf4]
add eax, esi
sar eax, 0x10
mov dword [ebp + 0x168], eax
movzx eax, byte [ebx]
mov dword [ebp + 0x16c], eax
shl eax, 0x10
mov esi, eax
push ecx
push esi
call fcn.007795d0
mov edx, dword [ebp + 0xe0]
push edx
push 1
call fcn.007795d0
mov eax, dword [ebp + 0xec]
push eax
push esi
call fcn.007795d0
mov ecx, dword [ebp + 0xe4]
push ecx
push 1
mov esi, eax
call fcn.007795d0
mov edx, dword [ebp + 0xf4]
add esi, eax
movzx eax, word [ebp + 0x18]
imul eax, eax, 0x1cb
add eax, 0x8000
add edx, esi
sar eax, 0x10
mov dword [ebp + 0x170], eax
sar edx, 0x10
mov dword [ebp + 0x16c], edx
movzx ecx, byte [ebx + 1]
movzx edx, byte [ebx + 2]
add ebx, 3
shl ecx, 8
lea eax, [ecx + edx]
mov dword [ebp + 0x174], eax
shl eax, 0x10
mov edi, eax
mov eax, dword [ebp + 0xe0]
add esp, 0x40
push eax
push edi
call fcn.007795d0
mov ecx, dword [ebp + 0xe8]
push ecx
push 1
mov esi, eax
call fcn.007795d0
mov edx, dword [ebp + 0xe4]
push edx
push edi
add esi, eax
call fcn.007795d0
mov eax, dword [ebp + 0xec]
push eax
push 1
call fcn.007795d0
mov eax, dword [ebp + 0xf0]
add eax, esi
sar eax, 0x10
mov dword [ebp + 0x174], eax
movzx ecx, byte [ebx]
movzx edx, byte [ebx + 1]
add ebx, 2
shl ecx, 8
lea eax, [ecx + edx]
mov dword [ebp + 0x178], eax
shl eax, 0x10
mov esi, eax
mov eax, dword [ebp + 0xe8]
push eax
push esi
call fcn.007795d0
mov ecx, dword [ebp + 0xe0]
push ecx
push 1
call fcn.007795d0
mov edx, dword [ebp + 0xec]
push edx
push esi
call fcn.007795d0
mov esi, eax
mov eax, dword [ebp + 0xe4]
push eax
push 1
call fcn.007795d0
add esi, eax
mov eax, dword [ebp + 0xf4]
add eax, esi
sar eax, 0x10
mov dword [ebp + 0x178], eax
movzx cx, byte [ebx]
movzx dx, byte [ebx + 1]
mov eax, dword [esp + 0x58]
add ebx, 2
add esp, 0x40
shl ecx, 8
push eax
mov esi, ebp
add ecx, edx
mov word [ebp + 0x108], cx
mov ecx, dword [esp + 0x24]
push ecx
lea edx, [esp + 0x74]
push edx
mov dword [esp + 0x78], ebx
call fcn.0077de00
add esp, 0xc
cmp word [ebp + 0x38], 0
mov dword [esp + 0x18], 0
jbe 0x780afa
mov dword [esp + 0x6c], 0
mov eax, dword [ebp + 0x3c]
mov ecx, dword [esp + 0x6c]
mov edx, dword [ecx + eax + 4]
test edx, edx
mov dword [esp + 0x70], 0
jle 0x780ada
xor esi, esi
lea esp, [esp]
mov edx, dword [ebp + 0x3c]
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax + edx + 8]
mov bx, word [esi + ecx + 2]
lea edi, [eax + edx + 8]
lea edx, [esp + 0x74]
push edx
mov eax, ebp
mov dword [esp + 0x78], 0
call fcn.0077e450
mov dx, word [esp + 0x78]
movzx eax, al
mov dword [ebp + 0x1ec], eax
mov ecx, dword [edi]
mov eax, dword [esp + 0x74]
mov word [esi + ecx], dx
mov ecx, dword [ebp + 0x3c]
mov edx, dword [esp + 0x70]
mov edi, dword [edx + ecx + 4]
add esp, 4
inc eax
add esi, 0xc
cmp eax, edi
mov dword [esp + 0x70], eax
jl 0x780a80
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x6c]
movzx ecx, word [ebp + 0x38]
inc eax
add esi, 0xc
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x6c], esi
jl 0x780a63
mov esi, ebp
call fcn.0077fdb0
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp]
push edx
push eax
call fcn.007722f0
mov ecx, dword [esp + 0x2c]
mov edx, dword [ebp]
push ecx
push edx
call fcn.007722f0
add esp, 0x10
pop edi
pop esi
mov byte [ebp + 0xad], 1
mov eax, ebp
pop ebp
pop ebx
add esp, 0x58
ret