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

Disassembly:
sub esp, 0xcc
mov eax, dword [0x571134]
xor eax, esp
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0xd4]
push ebp
mov ebp, dword [esp + 0xd4]
mov dword [esp + 0x18], eax
push esi
push edi
mov eax, dword [ebp]
mov edi, dword [esp + 0xe4]
mov esi, dword [ebp + 8]
mov dword [esp + 0x38], ebp
mov eax, dword [eax]
mov dword [esp + 0xc], edi
mov dword [esp + 0x48], eax
mov dword [esp + 0x1c], 0
mov ecx, dword [eax]
mov dword [esp + 0x24], ecx
xor ecx, ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x64], esi
cmp dword [eax + 0x24], ecx
je 0x4ec770
mov eax, dword [eax + 0xc]
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.004fb4f7
add esp, 0xcc
ret
mov eax, dword [esi + 0x2c]
mov edx, 0x18
mov edi, dword [edi + 0x38]
test al, 0x20
mov dword [esp + 0x44], eax
mov eax, 0x1bf
cmove edx, eax
test edi, 0x104
je 0x4ec7ad
mov ecx, edx
mov eax, edi
and ecx, 0xffffffc3
and al, 4
cmove ecx, edx
mov edx, ecx
test edi, 0x100
je 0x4ec7ad
and edx, 0xffffff7c
movzx eax, word [esi + 0x1a]
movzx ecx, word [esi + 0x18]
mov edi, dword [esp + 0xc]
mov dword [esp + 0x54], eax
movzx eax, word [esi + 0x1c]
mov dword [esp + 0x58], eax
movzx eax, word [esi + 0x32]
mov dword [esp + 0x60], eax
movzx eax, word [esi + 0x30]
mov dword [esp + 0x5c], eax
mov eax, dword [esi]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 4]
push ebx
mov dword [esp + 0x54], eax
movzx eax, word [esi + 0x16]
mov ebx, eax
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x24]
push edi
push edx
mov dword [esp + 0x78], ebx
movzx ebx, cx
push ebx
push dword [eax + 0x2c]
lea eax, [esp + 0x88]
mov dword [esp + 0x50], ecx
push dword [ebp + 4]
mov dword [esp + 0x2c], ebx
push eax
call fcn.004f0230
mov ebp, eax
add esp, 0x18
xor eax, eax
mov word [esi + 0x12], ax
mov ecx, dword [edi + 8]
movzx ecx, word [ecx]
mov eax, ecx
mov dword [esp + 0x6c], eax
cmp ax, 0xa
jg 0x4ec83d
mov dword [esp + 0x38], 0
jmp 0x4ec856
movsx eax, cx
cdq
push edx
push eax
call fcn.004b1570
add esp, 8
sub ax, 0x21
movzx eax, ax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xec]
mov ecx, 0x100
mov dword [esp + 0x2c], eax
test ebp, ebp
je 0x4ece59
movzx edx, word [ebp + 0xc]
mov eax, edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x34], eax
cmp ax, cx
je 0x4ec88b
test byte [ebp + 0xa], 0x80
je 0x4ec8b6
mov eax, dword [edi + 4]
movsx ecx, word [eax + ebx*2]
test ecx, ecx
js 0x4ec8ad
mov eax, dword [edi + 0xc]
add ecx, ecx
mov eax, dword [eax + 4]
mov eax, dword [eax + ecx*8 + 4]
and eax, 0xf
jne 0x4ece3a
jmp 0x4ec8b6
cmp ecx, 0xffffffff
je 0x4ece3a
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0xc]
and ecx, dword [ebp + 0x20]
and eax, dword [ebp + 0x24]
or ecx, eax
jne 0x4ece3a
mov eax, 0x100
test word [ebp + 0xa], ax
je 0x4ec8de
cmp edx, 0x10
je 0x4ece3a
mov eax, dword [esp + 0x24]
mov cl, byte [eax + 0x24]
test cl, 0x58
je 0x4ec91b
mov eax, dword [ebp]
mov edx, dword [eax + 4]
test dl, 3
je 0x4ece3a
mov ebx, dword [esp + 0x24]
mov eax, dword [eax + 0x24]
cmp eax, dword [ebx + 0x2c]
mov ebx, dword [esp + 0x18]
jne 0x4ece3a
test cl, 0x18
je 0x4ec91b
test dl, 2
jne 0x4ece3a
cmp byte [edi + 0x36], 0
je 0x4ec934
movzx eax, word [edi + 0x32]
dec eax
cmp ebx, eax
jne 0x4ec934
mov eax, dword [esp + 0x3c]
or byte [eax + 0x10], 2
jmp 0x4ec93c
mov eax, dword [esp + 0x3c]
or byte [eax + 0x10], 1
mov eax, dword [esp + 0x48]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x40]
mov word [esi + 0x18], ax
mov eax, dword [esp + 0x58]
mov word [esi + 0x1a], ax
mov eax, dword [esp + 0x5c]
mov word [esi + 0x1c], ax
mov eax, dword [esp + 0x60]
mov word [esi + 0x30], ax
cmp ax, word [esi + 0x34]
jb 0x4ec984
mov ebx, dword [esp + 0x28]
movzx eax, ax
inc eax
push eax
push esi
push ebx
call fcn.004ee580
add esp, 0xc
test eax, eax
jne 0x4ece5d
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov edi, dword [esp + 0x50]
mov dword [eax + ecx*4], ebp
mov ax, word [esi + 0x30]
mov ecx, dword [esi + 8]
inc ax
mov word [esi + 0x30], ax
not ecx
mov edx, dword [ebp + 0x24]
or edi, dword [ebp + 0x20]
or edx, dword [esp + 0x54]
and edi, ecx
movzx ebx, ax
mov eax, dword [esi + 0xc]
not eax
mov dword [esi], edi
and edx, eax
mov eax, dword [esp + 0x34]
mov dword [esi + 4], edx
test al, 1
je 0x4ecace
mov edx, dword [ebp]
test dword [edx + 4], 0x1000
je 0x4eca49
lea edi, [ebx - 1]
mov dword [esp + 0x14], 0x2e
xor ecx, ecx
test edi, edi
jle 0x4eca6a
mov ebx, dword [esi + 0x38]
mov esi, dword [esp + 0x14]
mov eax, dword [ebx + ecx*4]
test eax, eax
je 0x4eca06
cmp dword [eax], edx
mov dword [esp + 0x14], 0
cmove esi, dword [esp + 0x14]
inc ecx
cmp ecx, edi
jl 0x4ec9f0
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x68]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test byte [eax + 0x38], 0x80
je 0x4ecaba
cmp word [esp + 0x38], 0xa
jl 0x4ecaba
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x18]
movzx edi, cx
movzx ebx, word [eax + edx*2]
cmp di, 0xa
jg 0x4eca71
xor eax, eax
jmp 0x4eca86
mov eax, dword [edx + 0x14]
test eax, eax
je 0x4eca13
mov eax, dword [eax]
test eax, eax
je 0x4eca13
cdq
push edx
push eax
call fcn.004b1570
movsx ecx, ax
add esp, 8
mov dword [esp + 0x14], ecx
jmp 0x4eca17
mov ecx, 0x2e
jmp 0x4eca17
movsx eax, di
cdq
push edx
push eax
call fcn.004b1570
add esp, 8
sub ax, 0x21
movzx eax, ax
sub eax, edi
sub eax, dword [esp + 0x38]
add eax, 0xa
add eax, ebx
test ax, ax
jns 0x4ecaba
cmp word [esp + 0x2c], 2
jge 0x4ece32
mov eax, dword [esp + 0x28]
test dword [eax + 0x50], 0x20000
jne 0x4ece32
or dword [esi + 0x2c], 0x100000
or dword [esi + 0x2c], 4
mov ebx, dword [esi + 0x2c]
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
jmp 0x4ecc2b
mov edi, dword [esp + 0x10]
test al, 0x82
je 0x4ecb66
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x18]
movsx eax, word [eax + ecx*2]
mov ecx, dword [esi + 0x2c]
or ecx, 1
mov dword [esi + 0x2c], ecx
cmp eax, 0xffffffff
je 0x4ecb37
mov edx, ecx
mov ebx, ecx
test eax, eax
js 0x4ecb44
cmp word [esp + 0x2c], 0
jne 0x4ecb44
movzx edi, word [edi + 0x32]
lea eax, [edi - 1]
cmp dword [esp + 0x18], eax
jne 0x4ecb44
mov eax, dword [esp + 0x10]
test byte [eax + 0x38], 8
jne 0x4ecb37
cmp edi, 1
jne 0x4ecb2d
cmp byte [eax + 0x36], 0
je 0x4ecb2d
cmp word [esp + 0x34], 2
je 0x4ecb37
mov ebx, ecx
or ebx, 0x10000
jmp 0x4ecb3f
mov ebx, ecx
or ebx, 0x1000
mov edx, ebx
mov dword [esi + 0x2c], ebx
cmp byte [esp + 0x91], 1
jbe 0x4ecb59
mov ebx, edx
or ebx, 0x200000
mov dword [esi + 0x2c], ebx
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
jmp 0x4ecc2b
test eax, 0x100
je 0x4ecb7d
or dword [esi + 0x2c], 8
mov ebx, dword [esi + 0x2c]
mov edx, dword [esp + 0x1c]
jmp 0x4ecc2b
mov eax, dword [esp + 0x24]
push ebp
push dword [esp + 0x1c]
push edi
push dword [eax + 0x2c]
push dword [esp + 0x5c]
call fcn.004effe0
mov ebx, dword [esi + 0x2c]
add esp, 0x14
test byte [esp + 0x34], 0x24
je 0x4ecc05
or ebx, 0x22
mov word [esi + 0x1a], ax
xor ecx, ecx
mov dword [esi + 0x2c], ebx
mov eax, 0x100
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x30], ecx
test word [ebp + 0xa], ax
je 0x4ecbff
movzx eax, word [esi + 0x30]
lea ebx, [ebp + 0x30]
inc eax
mov dword [esp + 0x30], ebx
push eax
push esi
push dword [esp + 0x30]
call fcn.004ee580
add esp, 0xc
test eax, eax
jne 0x4ece59
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov dword [eax + ecx*4], ebx
mov eax, 1
inc word [esi + 0x30]
or dword [esi + 0x2c], 0x10
mov ebx, dword [esi + 0x2c]
mov word [esi + 0x1c], ax
mov edx, dword [esp + 0x1c]
jmp 0x4ecc2b
or ebx, 0x12
mov word [esi + 0x1c], ax
mov dword [esi + 0x2c], ebx
mov dword [esp + 0x30], ebp
test bl, 0x20
je 0x4ecc25
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov edx, dword [eax + ecx*4 - 8]
jmp 0x4ecc27
xor edx, edx
mov dword [esp + 0x1c], edx
test bl, 2
je 0x4eccd0
movzx eax, word [esi + 0x16]
movsx edi, ax
test edx, edx
je 0x4ecc55
movzx ecx, word [edx + 8]
test cx, cx
jg 0x4ecc4c
add eax, ecx
jmp 0x4ecc55
test byte [edx + 0xa], 0x80
jne 0x4ecc55
sub eax, 0x14
mov ebp, dword [esp + 0x30]
movzx ecx, ax
test ebp, ebp
je 0x4ecc79
movzx edx, word [ebp + 8]
test dx, dx
jg 0x4ecc6d
add eax, edx
jmp 0x4ecc76
test byte [ebp + 0xa], 0x80
jne 0x4ecc79
add eax, 0xffffffec
movzx ecx, ax
mov eax, dword [esp + 0x1c]
movzx edx, cx
test eax, eax
je 0x4ecc9c
cmp word [eax + 8], 0
jle 0x4ecc9c
test ebp, ebp
je 0x4ecc9c
cmp word [ebp + 8], 0
jle 0x4ecc9c
lea eax, [ecx - 0x14]
movzx edx, ax
xor eax, eax
cmp dword [esp + 0x1c], eax
setne al
sub edi, eax
xor eax, eax
test ebp, ebp
setne al
sub edi, eax
cmp dx, 0xa
mov eax, 0xa
cmovl edx, eax
movzx eax, dx
cmp eax, edi
mov edx, eax
movzx eax, di
cmovge edx, eax
movzx eax, dx
mov edi, eax
jmp 0x4ecd27
inc word [esi + 0x18]
movzx ecx, word [ebp + 8]
movzx edx, word [esi + 0x18]
test cx, cx
jg 0x4eccfd
mov eax, dword [edi + 4]
mov ebp, dword [esp + 0x18]
cmp word [eax + ebp*2], 0
jl 0x4eccfd
sub ecx, dword [esp + 0x14]
add word [esi + 0x16], cx
movzx edi, word [esi + 0x16]
jmp 0x4ecd2b
mov eax, dword [edi + 8]
mov cx, word [eax + edx*2]
sub cx, word [eax + edx*2 - 2]
add cx, word [esi + 0x16]
test dword [esp + 0x34], 0x100
movzx eax, cx
mov word [esi + 0x16], cx
movzx edi, cx
je 0x4ecd2b
add eax, 0xa
movzx edi, ax
mov word [esi + 0x16], ax
mov ecx, dword [esp + 0x10]
lea eax, [edi + 0x10]
movzx ebp, ax
mov eax, dword [ecx + 0x38]
and eax, 3
cmp al, 3
jne 0x4ecd43
mov eax, ebp
jmp 0x4ecd62
movsx ecx, word [ecx + 0x30]
mov eax, ecx
shl eax, 4
sub eax, ecx
mov ecx, dword [esp + 0x24]
cdq
mov ecx, dword [ecx + 0x10]
movsx ecx, word [ecx + 0x28]
idiv ecx
inc eax
add eax, edi
movzx eax, ax
push eax
push dword [esp + 0x3c]
mov ecx, ebp
movzx ebp, cx
call fcn.004b1610
add esp, 8
movzx ecx, ax
test ebx, 0x4000140
jne 0x4ecd8c
push ebp
push eax
call fcn.004b1610
add esp, 8
movzx ecx, ax
mov eax, dword [esp + 0x14]
push dword [esp + 0x6c]
mov ebp, dword [esp + 0x40]
movzx ebx, ax
push esi
lea eax, [ecx + ebx]
add eax, dword [esp + 0x34]
mov word [esi + 0x14], ax
lea eax, [edi + ebx]
add eax, dword [esp + 0x34]
mov word [esi + 0x16], ax
push dword [ebp + 4]
call fcn.004ee340
push esi
push ebp
call fcn.004ee090
mov ecx, dword [esp + 0x84]
add esp, 0x14
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x2c]
test al, 2
movzx edx, cx
movzx ecx, di
mov edi, dword [esp + 0x10]
cmove edx, ecx
mov word [esi + 0x16], dx
test al, 0x10
jne 0x4ece28
movzx ecx, word [esi + 0x18]
cmp cx, word [edi + 0x34]
jae 0x4ece28
cmp cx, word [edi + 0x32]
jb 0x4ece02
mov eax, dword [edi + 0x38]
and al, 3
cmp al, 2
je 0x4ece28
cmp ecx, 3
jbe 0x4ece13
push dword [esp + 0x4c]
call fcn.004ba690
add esp, 4
mov eax, dword [esp + 0x2c]
add eax, ebx
push eax
push edi
push dword [esp + 0x2c]
push ebp
call fcn.004ec6f0
add esp, 0x10
mov eax, dword [esp + 0x44]
mov word [esi + 0x16], ax
jmp 0x4ece36
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
lea eax, [esp + 0x78]
push eax
call fcn.004f0340
add esp, 4
mov ebp, eax
cmp dword [esp + 0x20], 0
mov ecx, 0x100
je 0x4ec866
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x50]
mov ebp, dword [esp + 0x64]
mov edx, dword [esp + 0x60]
mov word [esi + 0x1a], cx
mov ecx, dword [esp + 0x5c]
mov dword [esi], eax
mov eax, dword [esp + 0x54]
mov word [esi + 0x1c], cx
mov ecx, dword [esp + 0x48]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x40]
mov dword [esi + 0x2c], ecx
mov ecx, dword [esp + 0x44]
mov word [esi + 0x18], ax
mov word [esi + 0x32], bp
mov word [esi + 0x16], cx
mov word [esi + 0x30], dx
cmp ax, bp
jne 0x4ecf79
mov ebp, dword [esp + 0x18]
movzx ecx, word [edi + 0x32]
lea eax, [ebp + 1]
cmp eax, ecx
jae 0x4ecf79
cmp word [esp + 0x40], dx
jne 0x4ecf79
mov eax, dword [edi + 0x38]
test al, 0x40
jne 0x4ecf79
test al, al
jns 0x4ecf79
test dword [ebx + 0x50], 0x4000
jne 0x4ecf79
mov eax, dword [edi + 8]
cmp word [eax + ebp*2 + 2], 0x2a
jl 0x4ecf79
movzx eax, dx
inc eax
push eax
push esi
push ebx
call fcn.004ee580
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4ecf7d
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
inc word [esi + 0x18]
inc word [esi + 0x32]
mov dword [eax + ecx*4], ebx
inc word [esi + 0x30]
or dword [esi + 0x2c], 0x8000
mov eax, dword [edi + 8]
mov cx, word [eax + ebp*2]
sub cx, word [eax + ebp*2 + 2]
mov ebp, dword [esp + 0x3c]
movzx eax, cx
mov ecx, dword [esp + 0x2c]
sub word [esi + 0x16], ax
add ecx, 5
add eax, ecx
push eax
push edi
push dword [esp + 0x2c]
push ebp
call fcn.004ec6f0
mov eax, dword [esp + 0x54]
add esp, 0x10
mov word [esi + 0x16], ax
mov eax, dword [esp + 0x40]
mov word [esi + 0x18], ax
mov eax, dword [esp + 0x64]
mov word [esi + 0x32], ax
mov eax, dword [esp + 0x48]
mov dword [esi + 0x2c], eax
jmp 0x4ecf7d
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0xd8]
mov eax, ebx
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004fb4f7
add esp, 0xcc
ret