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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2a4
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, ecx
xor ecx, ecx
mov dword [ebx + 8], ecx
mov dword [ebx], esi
cmp edi, 3
jle 0x640df7
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
cmp dword [eax + 8], 3
jne 0x640df7
mov edx, dword [eax]
mov dword [esp + 0x38], edx
jmp 0x640dfb
mov dword [esp + 0x38], ecx
mov dword [esp + 0x28], ecx
cmp edi, 2
jle 0x640e1e
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
lea ecx, [esp + 0xb0]
call fcn.00646750
mov dword [esp + 0x44], eax
xor ecx, ecx
jmp 0x640e26
mov dword [esp + 0x44], 0x4a69fc
mov dword [esp + 0x30], ecx
mov dword [ebx + 4], ecx
cmp edi, 4
jle 0x640e47
push ecx
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx + 0x10]
call fcn.00646620
add esp, 4
mov dword [esp + 0x20], eax
jmp 0x640e4f
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x14], 0
mov edi, esi
mov dword [esp + 0x3c], esi
lea ecx, [ecx]
cmp dword [esp + 0x20], 0
je 0x640e99
mov edx, dword [ebp + 0x28]
mov eax, dword [ebp + 0x24]
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [ebp + 0x20]
push eax
mov eax, dword [ebp + 0x1c]
push ecx
mov ecx, dword [ebp + 0x14]
push edx
push eax
mov eax, dword [ebp + 0x10]
push esi
push ecx
call fcn.0067fc40
add esp, 0x1c
mov dword [esp + 0x4c], eax
cmp eax, 0xffffffff
jne 0x640fa9
cmp dword [esp + 0x14], 0
mov eax, dword [ebp + 0x1c]
je 0x641368
cmp dword [ebp + 0x20], eax
jge 0x641368
cmp dword [esp + 0x20], 0
je 0x641368
movzx ecx, word [edi]
mov eax, ecx
lea edx, [eax + 0x2800]
mov esi, 0x3ff
mov dword [esp + 0x14], 0
cmp dx, si
ja 0x640f29
movzx edx, word [edi + 2]
mov esi, 0xdc00
cmp dx, si
jb 0x640f29
mov esi, 0xdfff
cmp dx, si
ja 0x640f29
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0xc]
mov word [edx + ecx*2], ax
mov ecx, 1
add dword [ebx + 4], ecx
mov si, word [edi + 2]
mov eax, dword [ebx + 4]
mov edx, dword [ebx + 0xc]
mov word [edx + eax*2], si
add dword [ebx + 4], ecx
add dword [ebp + 0x20], 2
mov esi, dword [ebp + 0x18]
mov eax, dword [ebp + 0x20]
lea edi, [esi + eax*2]
mov dword [esp + 0x3c], edi
jmp 0x640e60
mov eax, dword [ebx + 4]
mov edx, dword [ebx + 0xc]
mov word [edx + eax*2], cx
mov eax, 1
add dword [ebx + 4], eax
add dword [ebp + 0x20], eax
cmp word [edi], 0xd
jne 0x641356
cmp word [edi + 2], 0xa
jne 0x641356
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push 0
lea esi, [esp + 0x4c]
call fcn.0066e430
add esp, 4
test eax, eax
jne 0x641356
test dword [esp + 0x48], 0x400000
je 0x641356
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0xc]
mov esi, dword [ebp + 0x18]
mov edx, 0xa
mov word [ecx + eax*2], dx
mov eax, 1
add dword [ebx + 4], eax
add dword [ebp + 0x20], eax
mov eax, dword [ebp + 0x20]
lea edi, [esi + eax*2]
mov dword [esp + 0x3c], edi
jmp 0x640e60
test eax, eax
js 0x6413e8
mov eax, 1
add dword [esp + 0x28], eax
sub dword [esp + 0x20], eax
mov eax, dword [ebp + 0x24]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
add eax, eax
sub eax, edi
add eax, esi
sar eax, 1
mov dword [esp + 0x40], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], 0
mov edi, edi
cmp dword [esp + 0x14], 0
je 0x641072
mov eax, dword [esp + 0x18]
lea edx, [eax + 3]
cmp edx, dword [esp + 0x30]
jle 0x64103d
mov edx, dword [esp + 0x40]
push edx
lea ecx, [eax + 2]
push ecx
mov ecx, dword [ebp + 0x1c]
push ecx
mov ecx, dword [esp + 0x2c]
sub eax, edx
push ecx
mov ecx, dword [esp + 0x38]
cdq
idiv ecx
push ecx
mov edi, eax
call fcn.00669120
lea edx, [eax + eax]
add esp, 0x14
mov dword [esp + 0x30], eax
mov eax, dword [ebx + 0xc]
push edx
push eax
call fcn.006828f7
add esp, 8
test eax, eax
je 0x64142d
mov dword [ebx + 0xc], eax
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x641063
mov edx, dword [esp + 0x3c]
mov eax, dword [ebx + 4]
lea ecx, [esi + esi]
push ecx
mov ecx, dword [ebx + 0xc]
push edx
lea edx, [ecx + eax*2]
push edx
call fcn.006896e0
add esp, 0xc
add dword [ebx + 4], esi
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0xc]
lea edx, [ecx + eax*2]
mov dword [esp + 0x10], edx
jmp 0x64107d
mov eax, dword [ebx + 4]
add eax, dword [esp + 0x2c]
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x44]
movzx eax, word [esi]
xor edi, edi
mov edx, esi
cmp dword [esp + 0x14], edi
je 0x6410bd
cmp ax, di
je 0x6410b2
mov ecx, dword [esp + 0x10]
cmp ax, 0x24
je 0x6410ae
add esi, 2
mov word [ecx], ax
movzx eax, word [esi]
add ecx, 2
cmp ax, di
jne 0x641097
mov dword [esp + 0x10], ecx
mov eax, esi
sub eax, edx
sar eax, 1
add dword [ebx + 4], eax
jmp 0x6410de
cmp ax, di
je 0x6410d4
cmp ax, 0x24
je 0x6410d4
movzx eax, word [esi + 2]
add esi, 2
cmp ax, di
jne 0x6410c2
mov ecx, esi
sub ecx, edx
sar ecx, 1
add dword [esp + 0x18], ecx
cmp word [esi], di
je 0x641323
movzx eax, word [esi + 2]
mov dword [esp + 0x34], edi
mov dword [esp + 0x24], edi
cmp ax, di
je 0x64113c
mov edi, eax
test edi, 0xffffff80
jne 0x641117
push 2
push edi
call fcn.0068288e
add esp, 8
test eax, eax
je 0x641117
and edi, 0xffdf
mov eax, edi
movzx ecx, ax
cmp ecx, 0x4c
je 0x641129
add ecx, 0xffffffac
cmp ecx, 1
ja 0x64113c
movzx edx, ax
movzx eax, word [esi + 4]
mov dword [esp + 0x34], edx
mov dword [esp + 0x24], 1
movzx ecx, ax
mov dword [esp + 0x1c], 0x80000000
test ecx, ecx
je 0x641178
cmp ecx, 0x24
je 0x641237
cmp ecx, 0x7b
je 0x6411a2
add eax, 0xffffffd0
cmp ax, 9
ja 0x641178
lea eax, [ecx - 0x30]
mov ecx, dword [esp + 0x24]
lea esi, [esi + ecx*2 + 2]
cmp eax, 0x80000000
jne 0x64124b
cmp dword [esp + 0x14], 0
mov ebx, dword [ebp + 8]
je 0x64123f
mov cx, word [esi]
mov eax, dword [esp + 0x10]
mov word [eax], cx
inc dword [ebx + 4]
add eax, 2
mov dword [esp + 0x10], eax
add esi, 2
jmp 0x641081
mov edx, dword [esp + 0x24]
lea ebx, [esi + edx*2 + 4]
push 0x7d
push ebx
call fcn.00682411
add esp, 8
mov dword [esp + 0x24], eax
test eax, eax
je 0x641178
mov edi, eax
sub edi, ebx
sar edi, 1
je 0x641178
cmp edi, 0x21
jae 0x641227
push edi
lea eax, [esp + 0x6c]
push ebx
push eax
call fcn.006840d4
add esp, 0xc
xor ecx, ecx
push ecx
push 1
push ecx
push 1
lea eax, [esp + 0x78]
mov word [esp + edi*2 + 0x78], cx
call fcn.00668400
add esp, 0x10
test eax, eax
je 0x641213
lea edx, [esp + 0x68]
push edx
call fcn.006828d6
mov esi, dword [esp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x20], eax
add esp, 4
jmp 0x64116d
lea eax, [esp + 0x68]
push eax
mov eax, dword [ebp + 0x10]
call fcn.006808a0
mov dword [esp + 0x20], eax
add esp, 4
mov esi, dword [esp + 0x24]
mov ebx, dword [ebp + 8]
mov eax, dword [esp + 0x1c]
jmp 0x64116d
add esi, 2
jmp 0x641178
inc dword [esp + 0x18]
add esi, 2
jmp 0x641081
test eax, eax
js 0x64131b
cmp eax, dword [esp + 0x4c]
jge 0x64131b
mov edx, dword [ebp + 0x24]
mov ecx, dword [edx + eax*8]
mov eax, dword [edx + eax*8 + 4]
sub eax, ecx
mov dword [esp + 0x1c], eax
je 0x64131b
cmp dword [esp + 0x14], 0
je 0x641313
mov edx, dword [ebp + 0x18]
mov edi, eax
add edi, edi
lea eax, [edx + ecx*2]
mov ecx, dword [esp + 0x10]
push edi
push eax
push ecx
call fcn.006896e0
add esp, 0xc
cmp word [esp + 0x34], 0
je 0x641300
mov eax, dword [esp + 0x10]
xor edx, edx
mov word [edi + eax], dx
movzx eax, word [esp + 0x34]
sub eax, 0x4c
je 0x6412f5
sub eax, 8
je 0x6412d9
dec eax
jne 0x641300
mov ecx, dword [esp + 0x10]
push ecx
call dword [fcn.0049a61c]
mov eax, dword [esp + 0x1c]
add dword [esp + 0x10], edi
add dword [ebx + 4], eax
add esi, 2
jmp 0x641081
mov eax, dword [esp + 0x10]
call fcn.0060b210
mov eax, dword [esp + 0x1c]
add dword [esp + 0x10], edi
add dword [ebx + 4], eax
add esi, 2
jmp 0x641081
mov edx, dword [esp + 0x10]
push edx
call dword [fcn.0049a514]
mov eax, dword [esp + 0x1c]
add dword [esp + 0x10], edi
add dword [ebx + 4], eax
add esi, 2
jmp 0x641081
mov ecx, dword [esp + 0x1c]
add dword [esp + 0x18], ecx
add esi, 2
jmp 0x641081
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, 2
jl 0x640fe0
mov ecx, dword [ebp + 0x24]
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
mov edx, dword [esp + 0x40]
neg eax
sbb eax, eax
and eax, 0xfffffbf0
add eax, 0x410
mov dword [esp + 0x14], eax
mov dword [ebp + 0x20], edx
mov esi, dword [ebp + 0x18]
mov eax, dword [ebp + 0x20]
lea edi, [esi + eax*2]
mov dword [esp + 0x3c], edi
jmp 0x640e60
cmp dword [esp + 0x28], 0
je 0x6413cd
sub eax, dword [ebp + 0x20]
mov dword [esp + 0x2c], eax
je 0x6413bc
mov esi, dword [ebx + 4]
add esi, eax
cmp esi, dword [esp + 0x30]
jl 0x6413a3
mov edx, dword [ebx + 0xc]
lea ecx, [esi + esi + 2]
push ecx
push edx
call fcn.006828f7
add esp, 8
test eax, eax
je 0x64142d
mov dword [ebx + 0xc], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0xc]
add eax, eax
push eax
lea eax, [edx + ecx*2]
push edi
push eax
call fcn.006896e0
add esp, 0xc
mov dword [ebx + 4], esi
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0xc]
xor eax, eax
mov word [edx + ecx*2], ax
mov ecx, dword [ebx + 0xc]
mov dword [ebx], ecx
mov ecx, dword [0x4c36ac]
push 1
push 0
push 0xffffffffffffffff
push 0x49c8c8
call fcn.0066b090
jmp 0x64148c
mov edx, dword [0x4bf3fc]
cmp byte [edx + 0x100], 0
je 0x64141f
push 0xa
lea ecx, [esp + 0x54]
push ecx
push eax
call fcn.006813c5
mov ecx, dword [0x4c562c]
add esp, 0xc
push 0x4a69fc
push 0x4a1e98
push eax
call fcn.00627930
jmp 0x64148c
mov edx, dword [0x4c36ac]
push edx
call fcn.005fc0d0
jmp 0x64148c
mov eax, dword [0x4bf3fc]
cmp byte [eax + 0x100], 0
jne 0x64144e
mov ecx, dword [0x4c36ac]
push ecx
mov eax, 0xfffffffa
call fcn.005fc0d0
jmp 0x641475
push 0xa
lea edx, [esp + 0x54]
push edx
push 0xfffffffffffffffa
call fcn.006813c5
mov ecx, dword [0x4c562c]
add esp, 0xc
push 0x4a69fc
push 0x4a1e98
push eax
call fcn.00627930
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x64148c
push eax
call fcn.00682c9f
add esp, 4
mov dword [ebx + 0xc], 0
mov esi, dword [esp + 0x38]
test esi, esi
je 0x641500
cmp byte [esi + 0x17], 0
jne 0x64149d
mov esi, dword [esi + 0xc]
mov al, byte [esi + 0x15]
test al, 2
je 0x6414b3
and al, 0x3d
mov byte [esi + 0x15], al
mov eax, dword [esi]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x28]
cdq
mov dword [esi], eax
mov al, byte [esi + 0x15]
and al, 0x9b
or al, 0x18
mov dword [esi + 4], edx
mov byte [esi + 0x15], al
jns 0x6414db
mov eax, esi
call fcn.005f9d60
and byte [esi + 0x15], 0x8f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x4c3004], 0
je 0x6414e8
test al, 0x10
jne 0x6414f5
cmp dword [0x4c3008], 0
je 0x641500
test al, 0x20
je 0x641500
test al, 8
je 0x641500
mov eax, esi
call fcn.005f9d60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret