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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
push ebx
push esi
push edi
lea edi, [ebp - 0x80]
mov ecx, 0x20
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [eax + 0x49]
cmp ecx, 1
jne 0x4f76d7
mov edx, dword [ebp + 8]
xor eax, eax
mov al, byte [edx + 0x48]
and eax, 2
test eax, eax
je 0x4f76d7
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x78]
xor eax, eax
mov al, byte [edx + 2]
test eax, eax
je 0x4f76d7
mov ecx, dword [ebp + 8]
add ecx, 0x18
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
mov eax, dword [edx]
cmp eax, dword [ebp + 0x10]
jne 0x4f7698
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ecx + 4]
cmp edx, dword [ebp + 0x14]
jne 0x4f7698
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0
xor eax, eax
jmp 0x4f7bfd
mov ecx, dword [ebp + 8]
xor edx, edx
mov dl, byte [ecx + 0x48]
and edx, 8
test edx, edx
je 0x4f76d7
mov eax, dword [ebp + 8]
add eax, 0x18
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
cmp edx, dword [ebp + 0x14]
jg 0x4f76d7
jl 0x4f76c7
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
cmp ecx, dword [ebp + 0x10]
jae 0x4f76d7
mov edx, dword [ebp + 0x1c]
mov dword [edx], 0xffffffff
xor eax, eax
jmp 0x4f7bfd
cmp dword [ebp + 0xc], 0
je 0x4f76f5
mov eax, dword [ebp + 0xc]
push eax
call fcn.004fffd0
add esp, 4
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0xc]
mov byte [ecx + 7], 0
jmp 0x4f76fc
mov dword [ebp - 8], 0
mov edx, dword [ebp + 8]
push edx
call fcn.004f6ff0
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4f7719
mov eax, dword [ebp - 4]
jmp 0x4f7bfd
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [eax + 0x49]
test ecx, ecx
jne 0x4f7735
mov edx, dword [ebp + 0x1c]
mov dword [edx], 0xffffffff
xor eax, eax
jmp 0x4f7bfd
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x4c]
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx*4 + 0x78]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dx, word [ecx + 0x12]
sub edx, 1
mov dword [ebp - 0x10], edx
mov ecx, 1
sub ecx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x10]
sar eax, cl
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x4c]
mov eax, dword [ebp + 8]
mov cx, word [ebp - 0x14]
mov word [eax + edx*2 + 0x4e], cx
cmp dword [ebp - 8], 0
jne 0x4f78fa
mov edx, dword [ebp - 0x20]
xor eax, eax
mov ax, word [edx + 0x14]
mov esi, eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x40]
mov ecx, dword [ebp - 0x14]
xor ebx, ebx
mov bl, byte [edx + ecx*2]
shl ebx, 8
mov edx, dword [ebp - 0x20]
mov ecx, dword [edx + 0x40]
mov edx, dword [ebp - 0x14]
xor eax, eax
mov al, byte [ecx + edx*2 + 1]
or ebx, eax
and esi, ebx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x38]
add ecx, esi
mov edx, dword [ebp - 0x20]
xor eax, eax
mov al, byte [edx + 7]
add ecx, eax
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dl, byte [ecx + 3]
test edx, edx
je 0x4f7816
mov eax, dword [ebp - 0x24]
xor ecx, ecx
mov cl, byte [eax]
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
cmp ecx, 0x80
jl 0x4f7816
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [eax + 0x3c]
jb 0x4f7814
movsx edx, word [0x591de8]
add edx, 0x49
push edx
call fcn.00552c70
add esp, 4
jmp 0x4f7bfd
jmp 0x4f77d9
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.004e0e30
add esp, 8
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp + 0x14]
jg 0x4f785a
jl 0x4f7838
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp + 0x10]
jae 0x4f785a
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x10]
jle 0x4f7855
mov dword [ebp - 0x18], 0xffffffff
jmp 0x4f78f5
jmp 0x4f78e5
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp + 0x14]
jl 0x4f7888
jg 0x4f786c
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp + 0x10]
jbe 0x4f7888
mov edx, dword [ebp - 0x14]
sub edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x10]
jle 0x4f7886
mov dword [ebp - 0x18], 1
jmp 0x4f78f5
jmp 0x4f78e5
mov ecx, dword [ebp + 8]
mov dl, byte [ecx + 0x48]
or dl, 2
mov eax, dword [ebp + 8]
mov byte [eax + 0x48], dl
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 0x18], edx
mov eax, dword [ebp - 0x28]
mov dword [ecx + 0x1c], eax
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x4c]
mov eax, dword [ebp + 8]
mov cx, word [ebp - 0x14]
mov word [eax + edx*2 + 0x4e], cx
mov edx, dword [ebp - 0x20]
xor eax, eax
mov al, byte [edx + 5]
test eax, eax
jne 0x4f78d0
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0xc], ecx
jmp 0x4f7b40
mov edx, dword [ebp + 0x1c]
mov dword [edx], 0
mov dword [ebp - 4], 0
jmp 0x4f7be2
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x10]
sar eax, 1
mov dword [ebp - 0x14], eax
jmp 0x4f7789
jmp 0x4f7b0d
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dx, word [ecx + 0x14]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x40]
mov eax, dword [ebp - 0x14]
xor ebx, ebx
mov bl, byte [ecx + eax*2]
shl ebx, 8
mov ecx, dword [ebp - 0x20]
mov esi, dword [ecx + 0x40]
mov ecx, dword [ebp - 0x14]
xor eax, eax
mov al, byte [esi + ecx*2 + 1]
or ebx, eax
and edx, ebx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x38]
add ecx, edx
mov edx, dword [ebp - 0x20]
xor eax, eax
mov al, byte [edx + 7]
add ecx, eax
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x24]
xor edx, edx
mov dl, byte [ecx]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov cl, byte [eax + 8]
cmp dword [ebp - 0x30], ecx
jg 0x4f7979
mov esi, esp
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x24]
add eax, 1
push eax
mov ecx, dword [ebp - 0x30]
push ecx
call dword [ebp - 8]
add esp, 0xc
cmp esi, esp
call sub.MSVCRT.dll__chkesp
mov dword [ebp - 0x18], eax
jmp 0x4f7a96
mov edx, dword [ebp - 0x24]
xor eax, eax
mov al, byte [edx + 1]
and eax, 0x80
test eax, eax
jne 0x4f79d4
mov ecx, dword [ebp - 0x30]
and ecx, 0x7f
shl ecx, 7
mov edx, dword [ebp - 0x24]
xor eax, eax
mov al, byte [edx + 1]
add ecx, eax
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dx, word [ecx + 0xa]
cmp dword [ebp - 0x30], edx
jg 0x4f79d4
mov esi, esp
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x24]
add ecx, 2
push ecx
mov edx, dword [ebp - 0x30]
push edx
call dword [ebp - 8]
add esp, 0xc
cmp esi, esp
call sub.MSVCRT.dll__chkesp
mov dword [ebp - 0x18], eax
jmp 0x4f7a96
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov cl, byte [eax + 7]
mov edx, dword [ebp - 0x24]
sub edx, ecx
mov dword [ebp - 0x38], edx
mov eax, dword [ebp + 8]
add eax, 0x18
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call fcn.004e0be0
add esp, 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x30]
cdq
push edx
push eax
call fcn.004cac00
add esp, 8
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x4f7a27
mov dword [ebp - 4], 7
jmp 0x4f7be2
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x4c]
mov ecx, dword [ebp + 8]
mov dx, word [ebp - 0x14]
mov word [ecx + eax*2 + 0x4e], dx
push 2
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.004e1f40
add esp, 0x14
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4f7a6c
mov eax, dword [ebp - 0x34]
push eax
call fcn.004cb000
add esp, 4
jmp 0x4f7be2
mov esi, esp
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x30]
push eax
call dword [ebp - 8]
add esp, 0xc
cmp esi, esp
call sub.MSVCRT.dll__chkesp
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.004cb000
add esp, 4
cmp dword [ebp - 0x18], 0
jge 0x4f7aa7
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0xc], edx
jmp 0x4f7af3
cmp dword [ebp - 0x18], 0
jle 0x4f7ab8
mov eax, dword [ebp - 0x14]
sub eax, 1
mov dword [ebp - 0x10], eax
jmp 0x4f7af3
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], 0
mov dword [ebp - 4], 0
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x4c]
mov ecx, dword [ebp + 8]
mov dx, word [ebp - 0x14]
mov word [ecx + eax*2 + 0x4e], dx
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [eax + 7]
test ecx, ecx
je 0x4f7aee
mov dword [ebp - 4], 0xb
jmp 0x4f7be2
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x10]
jle 0x4f7afd
jmp 0x4f7b0d
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x10]
sar eax, 1
mov dword [ebp - 0x14], eax
jmp 0x4f78fa
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dl, byte [ecx + 5]
test edx, edx
je 0x4f7b40
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x4c]
mov edx, dword [ebp + 8]
mov ax, word [ebp - 0x14]
mov word [edx + ecx*2 + 0x4e], ax
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x18]
mov dword [ecx], edx
mov dword [ebp - 4], 0
jmp 0x4f7be2
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov cx, word [eax + 0x12]
cmp dword [ebp - 0xc], ecx
jl 0x4f7b6e
mov edx, dword [ebp - 0x20]
xor eax, eax
mov al, byte [edx + 6]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x38]
lea eax, [edx + eax + 8]
push eax
call fcn.004d9140
add esp, 4
mov dword [ebp - 0x1c], eax
jmp 0x4f7baf
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dx, word [ecx + 0x14]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x40]
mov eax, dword [ebp - 0xc]
xor ebx, ebx
mov bl, byte [ecx + eax*2]
shl ebx, 8
mov ecx, dword [ebp - 0x20]
mov esi, dword [ecx + 0x40]
mov ecx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [esi + ecx*2 + 1]
or ebx, eax
and edx, ebx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x38]
add ecx, edx
push ecx
call fcn.004d9140
add esp, 4
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x4c]
mov ecx, dword [ebp + 8]
mov dx, word [ebp - 0xc]
mov word [ecx + eax*2 + 0x4e], dx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004f72a0
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4f7bdd
jmp 0x4f7be2
jmp 0x4f7735
mov edx, dword [ebp + 8]
mov word [edx + 0x2c], 0
mov eax, dword [ebp + 8]
mov cl, byte [eax + 0x48]
and cl, 0xf9
mov edx, dword [ebp + 8]
mov byte [edx + 0x48], cl
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
add esp, 0x80
cmp ebp, esp
call sub.MSVCRT.dll__chkesp
mov esp, ebp
pop ebp
ret