Function at 0x12ffa9d0
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x1598
call fcn.12f5d910
push esi
push edi
push 0x13183840
call fcn.12ffa080
mov esi, eax
push 0x1318383c
mov dword [esp + 0x4c], esi
call fcn.12ffa080
mov edi, eax
push 0x13183a6c
mov dword [esp + 0x4c], edi
call fcn.12ffa080
add esp, 0xc
mov dword [esp + 0x38], eax
test esi, esi
je 0x12ffbc4d
test edi, edi
je 0x12ffbc4d
test eax, eax
je 0x12ffbc4d
mov ecx, 0x54
xor eax, eax
lea edi, [esp + 0x334]
push ebx
rep stosd dword es:[edi], eax
mov ecx, 7
lea edi, [esp + 0x4c]
rep stosd dword es:[edi], eax
push ebp
mov ebp, dword [esp + 0x15ac]
lea eax, [esp + 0x50]
mov esi, 0x10000
push 0x1c
push eax
push esi
push ebp
mov dword [esp + 0x90], 0
mov dword [esp + 0x34c], 0x150
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jbe 0x12ffab4a
cmp dword [esp + 0x60], 0x1000
jne 0x12ffab28
mov eax, dword [esp + 0x64]
cmp al, 1
je 0x12ffab28
test ah, 1
jne 0x12ffab28
push 0x13183840
call fcn.12ffa080
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x12ffab28
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0xc4]
push eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc8]
push 0x40
push ecx
push esi
push ebp
call ebx
test eax, eax
je 0x12ffab28
cmp word [esp + 0xc4], 0x5a4d
jne 0x12ffab28
mov ecx, 0x3e
xor eax, eax
lea edi, [esp + 0x23c]
push eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x104]
lea edx, [esp + 0x240]
push 0xf8
add eax, esi
push edx
push eax
push ebp
call ebx
test eax, eax
je 0x12ffab28
cmp dword [esp + 0x23c], 0x4550
jne 0x12ffab28
mov eax, dword [esp + 0x252]
test ah, 0x20
je 0x12ffab58
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x5c]
lea eax, [esp + 0x50]
push 0x1c
lea esi, [edx + ecx]
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
ja 0x12ffaa7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
mov dword [esp + 0x10], ebx
jmp 0x12ffab5e
mov dword [esp + 0x10], esi
mov ebx, esi
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x84]
push eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x88]
push 0x40
push ecx
push ebx
push ebp
call dword [esp + 0x60]
test eax, eax
je 0x12ffbc3b
cmp word [esp + 0x84], 0x5a4d
mov ecx, 0x10
lea esi, [esp + 0x84]
lea edi, [esp + 0x350]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x340], ebx
jne 0x12ffbc3b
mov ecx, 0x3e
xor eax, eax
lea edi, [esp + 0x104]
push eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0xc4]
lea edx, [esp + 0x108]
push 0xf8
add eax, ebx
push edx
push eax
push ebp
call dword [esp + 0x60]
test eax, eax
je 0x12ffbc3b
mov eax, dword [esp + 0x104]
mov ecx, 0x3e
lea esi, [esp + 0x104]
lea edi, [esp + 0x390]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0xc0]
cmp eax, 0x4550
lea ecx, [esi + ebx]
mov dword [esp + 0x344], ecx
jne 0x12ffbc3b
mov ebx, dword [esp + 0x184]
xor eax, eax
mov ecx, 1
cmp ebx, eax
mov dword [esp + 0x44], ecx
jne 0x12ffac3c
xor ecx, ecx
mov dword [esp + 0x44], ecx
cmp esi, 0x40
mov dword [esp + 0x78], eax
jae 0x12ffac4d
mov dword [esp + 0x78], 1
cmp ecx, eax
mov dword [esp + 0x1c], eax
je 0x12ffaed8
mov dword [esp + 0x34], 0x2000
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x28], eax
cmp ecx, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
je 0x12ffbc3b
cmp ebx, eax
je 0x12ffbc3b
push 0x13183840
call fcn.12ffa080
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x12ffbc3b
mov eax, dword [esp + 0x34]
mov esi, 0x2000
cmp eax, esi
jbe 0x12ffacab
mov esi, eax
push esi
call fcn.12f5c05b
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x12ffbc3b
mov edi, dword [esp + 0x14]
mov ecx, esi
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x14]
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x3c]
push ecx
push esi
lea edi, [ebx + eax]
mov eax, dword [esp + 0x15b4]
push edx
push edi
push eax
mov dword [esp + 0x50], 0
call ebp
test eax, eax
je 0x12ffad07
mov ecx, dword [esp + 0x3c]
test ecx, ecx
jne 0x12ffad82
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x15ac]
lea ecx, [esp + 0x30]
xor ebx, ebx
push ecx
push 0x14
push edx
push edi
push eax
mov dword [esp + 0x44], ebx
call ebp
test eax, eax
je 0x12ffae64
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x12ffad70
mov eax, esi
inc ebx
add esi, 0x14
add edi, 0x14
test eax, eax
je 0x12ffad70
cmp dword [eax], 0
jne 0x12ffad51
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x12ffad70
cmp ebx, 0xc8
jae 0x12ffad70
mov edx, dword [esp + 0x15ac]
lea ecx, [esp + 0x30]
push ecx
push 0x14
push esi
push edi
push edx
call ebp
test eax, eax
jne 0x12ffad30
test ebx, ebx
jbe 0x12ffae64
lea ecx, [ebx + ebx*4]
shl ecx, 2
mov dword [esp + 0x3c], ecx
mov eax, 0xcccccccd
lea edi, [esp + 0x23d]
mul ecx
mov ebx, edx
mov edx, 0
mov ecx, 0x3f
mov eax, edx
mov byte [esp + 0x23c], dl
mov dword [esp + 0x7c], edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
shr ebx, 4
stosb byte es:[edi], al
mov dword [esp + 0x24], edx
je 0x12ffae5c
mov eax, dword [esp + 0x14]
lea esi, [eax + 0x10]
mov eax, dword [esp + 0x7c]
mov ecx, dword [esi - 0x10]
inc eax
test ecx, ecx
mov dword [esp + 0x7c], eax
jne 0x12ffaddb
cmp dword [esi], 0
je 0x12ffaeab
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x12ffae48
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x23c]
mov dword [esp + 0x38], eax
rep stosd dword es:[edi], eax
mov eax, dword [esi - 4]
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x240]
push 0xff
add eax, ecx
mov ecx, dword [esp + 0x15b4]
push edx
push eax
push ecx
call ebp
test eax, eax
je 0x12ffae48
mov eax, dword [esp + 0x38]
test eax, eax
jbe 0x12ffae48
lea edx, [esp + 0x23c]
push 0x130c55d4
push edx
call fcn.12f5ed10
add esp, 8
test eax, eax
jne 0x12ffae48
mov eax, dword [esi]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x24]
add esi, 0x14
inc eax
cmp eax, ebx
mov dword [esp + 0x24], eax
jb 0x12ffadc2
mov dword [esp + 0x20], 1
mov ecx, dword [esp + 0x14]
push ecx
call fcn.12f5c050
mov eax, dword [esp + 0x2c]
add esp, 4
test eax, eax
jne 0x12ffaee2
mov eax, dword [esp + 0x20]
test eax, eax
je 0x12ffbc3b
mov eax, dword [esp + 0x34]
add eax, 0x8000
cmp eax, 0x1a000
mov dword [esp + 0x34], eax
jge 0x12ffbc3b
mov ebx, dword [esp + 0x184]
xor eax, eax
jmp 0x12ffac61
mov edx, dword [esp + 0x1c]
lea ecx, [eax + eax*4]
shl ecx, 2
test edx, edx
mov dword [esp + 0x18], ecx
jne 0x12ffaece
cmp eax, 2
jb 0x12ffaece
mov edx, dword [esp + 0x14]
mov eax, dword [ecx + edx - 0x18]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], 1
jmp 0x12ffae64
mov dword [esp + 0x18], 0x14
jmp 0x12ffaee9
mov esi, dword [esp + 0xc0]
mov eax, 0xcccccccd
mul dword [esp + 0x18]
shr edx, 4
test edx, edx
mov dword [esp + 0x30], edx
je 0x12ffbc3b
mov eax, dword [esp + 0x18]
lea edx, [edx + edx*4]
shl edx, 2
cmp edx, eax
jne 0x12ffbc3b
mov eax, dword [esp + 0x118]
xor ecx, ecx
and eax, 0xffff
xor edx, edx
cmp word [esp + 0x10a], cx
mov dword [esp + 0x1d4], ecx
mov dword [esp + 0x1d8], ecx
mov dword [esp + 0x20], ecx
lea eax, [eax + esi + 0x18]
mov dword [esp + 0x24], edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x28], ecx
jbe 0x12ffb0a7
mov ecx, dword [esp + 0x10]
lea ebx, [eax + ecx]
xor eax, eax
mov ecx, 0xa
lea edi, [esp + 0x50]
push eax
lea edx, [esp + 0x54]
push 0x28
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x15b4]
push edx
push ebx
push eax
call dword [esp + 0x60]
test eax, eax
je 0x12ffbc3b
mov esi, dword [esp + 0x60]
test esi, esi
mov ecx, esi
jne 0x12ffaf92
mov ecx, dword [esp + 0x58]
mov edi, dword [esp + 0x1dc]
mov eax, dword [esp + 0x5c]
test edi, edi
jne 0x12ffafc3
mov edx, dword [esp + 0x184]
cmp edx, eax
jb 0x12ffafc3
lea ebp, [eax + ecx]
cmp edx, ebp
jae 0x12ffafc3
mov edi, eax
mov dword [esp + 0x1e0], ecx
mov dword [esp + 0x1dc], edi
mov edx, dword [esp + 0x44]
test edx, edx
je 0x12ffafe6
test edi, edi
jne 0x12ffafe6
mov edx, dword [esp + 0x1c]
cmp edx, eax
jb 0x12ffafe6
lea ebp, [eax + ecx]
cmp edx, ebp
jae 0x12ffafe6
mov dword [esp + 0x24], eax
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x64]
lea eax, [ecx + esi]
mov ecx, dword [esp + 0x20]
cmp ecx, eax
jae 0x12ffaff9
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x10a]
inc eax
and edx, 0xffff
add ebx, 0x28
cmp eax, edx
mov dword [esp + 0x28], eax
jb 0x12ffaf5a
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x44]
test eax, eax
je 0x12ffb044
test edi, edi
jne 0x12ffb044
test edx, edx
jbe 0x12ffbc3b
mov eax, dword [esp + 0x38]
mov dword [esp + 0x1dc], edx
mov dword [esp + 0x1e0], eax
mov edx, dword [esp + 0x10]
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x15ac]
lea ecx, [esp + 0x50]
push 0x1c
push ecx
push edx
push eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jbe 0x12ffb13b
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x54]
cmp eax, ecx
jne 0x12ffb141
mov edi, dword [esp + 0x50]
mov edx, dword [esp + 0x5c]
push 0x13183840
lea ebp, [edx + edi]
call fcn.12ffa080
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x12ffb0b3
xor esi, esi
jmp 0x12ffb113
mov edi, dword [esp + 0x1dc]
jmp 0x12ffb01e
cmp edi, ebp
jae 0x12ffb113
mov ecx, dword [esp + 0x15ac]
push 0
lea eax, [esp + 0x5ac]
push 0x1000
push eax
push edi
push ecx
call ebx
test eax, eax
je 0x12ffb113
and esi, 0xffff
lea ecx, [esp + 0x5a8]
mov eax, esi
mov edx, 0x800
xor esi, esi
mov si, word [ecx]
add ecx, 2
add eax, esi
mov esi, eax
and eax, 0xffff
shr esi, 0x10
add eax, esi
dec edx
jne 0x12ffb0e9
mov esi, eax
add edi, 0x1000
shr esi, 0x10
add esi, eax
cmp edi, ebp
jb 0x12ffb0b7
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x50]
add eax, edx
mov edx, dword [esp + 0x15ac]
push 0x1c
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
ja 0x12ffb075
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x15e]
push eax
mov eax, dword [esp + 0x160]
cmp si, ax
sbb ecx, ecx
neg ecx
sub esi, ecx
sub esi, eax
push esi
call fcn.12ffbc60
mov edx, dword [esp + 0x190]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x20]
add esp, 8
cmp edx, eax
mov dword [esp + 0x34], edx
jae 0x12ffb181
mov edx, eax
mov dword [esp + 0x34], edx
mov ecx, dword [esp + 0x15b4]
lea eax, [ecx + ecx*4]
shl eax, 2
mov dword [esp + 0x20], eax
lea edx, [eax + edx + 7]
mov eax, ecx
and edx, 0xfffffff8
shl eax, 4
add eax, edx
mov dword [esp + 0x24], edx
mov ebx, eax
mov dword [esp + 0x18], eax
test ecx, ecx
mov dword [esp + 0x3c], ebx
jbe 0x12ffb1d8
mov edx, dword [esp + 0x15b0]
mov esi, ecx
mov edi, dword [edx]
or ecx, 0xffffffff
xor eax, eax
add edx, 4
repne scasb al, byte es:[edi]
not ecx
add ecx, 3
and ecx, 0xfffffffc
add ebx, ecx
dec esi
jne 0x12ffb1bb
mov dword [esp + 0x3c], ebx
push ebx
call fcn.12f5c05b
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x14], edi
je 0x12ffbc3b
mov ecx, ebx
xor eax, eax
mov edx, ecx
mov esi, dword [esp + 0x10]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x124]
mov ecx, dword [esp + 0x128]
mov ebp, dword [esp + 0x120]
mov edi, dword [esp + 0x130]
add eax, ecx
add eax, ebp
add eax, edi
add eax, esi
cmp esi, eax
jae 0x12ffb22f
mov esi, eax
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x50]
push 0x13183848
rep stosd dword es:[edi], eax
call fcn.12ffa080
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x12ffbc2e
mov eax, dword [esp + 0x15ac]
lea edx, [esp + 0x50]
push 0x1c
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jbe 0x12ffb302
mov eax, dword [esp + 0x60]
cmp eax, 0x10000
mov eax, dword [esp + 0x50]
jne 0x12ffb2de
mov ecx, dword [esp + 0x5c]
lea esi, [eax + 0xffff]
and esi, 0xffff0000
add ecx, eax
cmp esi, ecx
jae 0x12ffb2de
mov edx, dword [esp + 0x15ac]
push 4
push 0x2000
push ebx
push esi
push edx
call ebp
test eax, eax
je 0x12ffb2ca
mov eax, dword [esp + 0x15ac]
push 4
push 0x1000
push ebx
push esi
push eax
call ebp
mov edi, eax
test edi, edi
mov dword [esp + 0x38], edi
jne 0x12ffb30d
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x5c]
add esi, 0x10000
add ecx, eax
cmp esi, ecx
jb 0x12ffb296
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x50]
add eax, edx
mov edx, dword [esp + 0x15ac]
push 0x1c
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
ja 0x12ffb271
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x12ffbc2e
mov ecx, dword [esp + 0x44]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34c], eax
je 0x12ffb350
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x184]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x14]
push 0x40
push ecx
mov ecx, dword [esp + 0x15b8]
add edx, eax
push edx
push ecx
call dword [esp + 0x54]
test eax, eax
je 0x12ffbc2e
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
mov eax, edi
mov dword [esp + 0x34c], edx
mov edx, dword [esp + 0x15b8]
sub eax, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
test edx, edx
jne 0x12ffb37c
mov edx, dword [esp + 0x20]
add eax, edx
mov edx, dword [esp + 0x44]
test edx, edx
je 0x12ffb3aa
mov edx, dword [esp + 0x34]
push 0
push edx
push eax
mov eax, dword [esp + 0x190]
add eax, ecx
mov ecx, dword [esp + 0x15b8]
push eax
push ecx
call dword [esp + 0x60]
test eax, eax
je 0x12ffbc2e
mov eax, dword [esp + 0x15b4]
mov dword [esp + 0x20], 0
test eax, eax
jbe 0x12ffb4bc
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov ebp, dword [esp + 0x15b0]
lea esi, [eax + edx]
lea edx, [edx + ecx + 4]
mov edi, dword [esp + 0x18]
mov ecx, dword [ebp]
mov eax, ebx
mov ebx, dword [esp + 0x14]
sub eax, edi
mov dword [esp + 0x24], 0
lea edi, [edi + ebx]
je 0x12ffb427
mov bl, byte [ecx]
test bl, bl
je 0x12ffb40c
mov byte [edi], bl
inc edi
inc ecx
dec eax
jne 0x12ffb3f7
dec edi
mov eax, 0x57
jmp 0x12ffb41c
test eax, eax
jne 0x12ffb418
dec edi
mov eax, 0x57
jmp 0x12ffb41c
mov eax, dword [esp + 0x24]
test eax, eax
mov byte [edi], 0
jl 0x12ffbc2e
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x15b8]
test ecx, ecx
lea eax, [ebx + eax - 1]
jne 0x12ffb440
mov eax, ebx
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x14]
lea edi, [esi + 8]
add edx, 0x10
lea eax, [eax + ecx*4]
xor ecx, ecx
add ebp, 4
mov dword [eax], esi
mov dword [edx - 0x14], 0x80000001
mov dword [edx - 0x10], ecx
mov dword [eax + 0x10], edi
mov edi, dword [esp + 0x1c]
mov dword [edx - 0xc], 0x80000001
mov dword [edx - 8], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x18]
add edi, ecx
or ecx, 0xffffffff
mov dword [eax + 0xc], edi
mov edi, dword [ebp - 4]
xor eax, eax
add esi, 0x10
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x15b4]
not ecx
add ecx, 3
and ecx, 0xfffffffc
add edi, ecx
inc ebx
mov dword [esp + 0x20], ebx
cmp ebx, eax
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x18], edi
jb 0x12ffb3db
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x15b8]
test eax, eax
je 0x12ffb4f3
mov eax, dword [esp + 0x15b4]
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x14]
xor edx, edx
add eax, ecx
lea eax, [eax + eax*4]
lea ecx, [esi + eax*4 - 0x14]
mov dword [esi + eax*4 - 0x14], edx
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
mov dword [ecx + 0x10], edx
jmp 0x12ffb4f7
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x15b4]
add edx, eax
xor ecx, ecx
test edx, edx
jbe 0x12ffb520
mov eax, esi
cmp dword [eax], 0
jne 0x12ffb518
mov ebp, dword [eax + 0x10]
test ebp, ebp
je 0x12ffb520
inc ecx
add eax, 0x14
cmp ecx, edx
jb 0x12ffb50c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x15ac]
push 0
push ecx
push esi
push edi
push edx
call dword [esp + 0x5c]
test eax, eax
je 0x12ffbc2e
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x188], ebx
mov dword [esp + 0x184], eax
mov eax, dword [esp + 0x1ec]
test eax, eax
je 0x12ffb60a
mov ecx, dword [esp + 0x1f0]
test ecx, ecx
je 0x12ffb60a
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x54]
push 0x14
lea esi, [eax + ecx]
mov eax, dword [esp + 0x15b4]
push edx
push esi
push eax
call dword [esp + 0x60]
test eax, eax
je 0x12ffbc2e
mov eax, dword [esp + 0x60]
lea edx, [esp + 0x2c]
mov dword [esp + 0x488], eax
and al, 0xfe
push edx
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x15b0]
push 4
push 0x14
lea ecx, [esi + 0x10]
push esi
push eax
mov dword [esp + 0x35c], ecx
call dword [esp + 0x54]
test eax, eax
je 0x12ffbc2e
mov edx, dword [esp + 0x15ac]
push 0
lea ecx, [esp + 0x54]
push 0x14
push ecx
push esi
push edx
call dword [esp + 0x5c]
test eax, eax
je 0x12ffbc2e
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x15ac]
lea eax, [esp + 0x2c]
push eax
push ecx
push 0x14
push esi
push edx
call dword [esp + 0x54]
test eax, eax
je 0x12ffbc2e
mov ecx, dword [esp + 0x158]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x15b0]
push 0x40
push ecx
push edx
push eax
call dword [esp + 0x54]
test eax, eax
je 0x12ffbc2e
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x12ffb644
mov word [esp + 0xa0], 0
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x15ac]
push 0
lea ecx, [esp + 0x88]
push 0x40
push ecx
push edx
push eax
call dword [esp + 0x5c]
test eax, eax
je 0x12ffbc2e
mov edx, dword [esp + 0xc0]
mov eax, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x108]
push 0xf8
push ecx
mov ecx, dword [esp + 0x15b8]
add edx, eax
push edx
push ecx
call dword [esp + 0x5c]
test eax, eax
je 0x12ffbc2e
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x12ffb7e6
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x50]
lea edx, [esp + 0x50]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x15ac]
push 0x1c
push edx
push eax
push ecx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jbe 0x12ffb791
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x54]
cmp eax, edx
jne 0x12ffb797
mov edi, dword [esp + 0x50]
mov eax, dword [esp + 0x5c]
push 0x13183840
lea ebp, [eax + edi]
call fcn.12ffa080
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x12ffb709
xor esi, esi
jmp 0x12ffb769
cmp edi, ebp
jae 0x12ffb769
mov edx, dword [esp + 0x15ac]
push 0
lea ecx, [esp + 0x5ac]
push 0x1000
push ecx
push edi
push edx
call ebx
test eax, eax
je 0x12ffb769
and esi, 0xffff
lea ecx, [esp + 0x5a8]
mov eax, esi
mov edx, 0x800
xor esi, esi
mov si, word [ecx]
add ecx, 2
add eax, esi
mov esi, eax
and eax, 0xffff
shr esi, 0x10
add eax, esi
dec edx
jne 0x12ffb73f
mov esi, eax
add edi, 0x1000
shr esi, 0x10
add esi, eax
cmp edi, ebp
jb 0x12ffb70d
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x5c]
lea edx, [esp + 0x50]
add eax, ecx
push 0x1c
push edx
push eax
mov eax, dword [esp + 0x15b8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
ja 0x12ffb6d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x15c]
cmp si, ax
sbb ecx, ecx
neg ecx
sub esi, ecx
sub esi, eax
mov eax, dword [esp + 0x15e]
cmp si, ax
sbb edx, edx
neg edx
sub esi, edx
sub esi, eax
mov eax, dword [esp + 0x28]
cmp si, ax
sbb ecx, ecx
neg ecx
add ecx, eax
mov ax, word [esp + 0xa0]
sub esi, ecx
cmp ax, si
sbb edx, edx
neg edx
add edx, esi
sub ax, dx
mov word [esp + 0xa0], ax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x15ac]
push 0
lea eax, [esp + 0x88]
push 0x40
push eax
push ecx
push edx
call dword [esp + 0x5c]
test eax, eax
je 0x12ffbc2e
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x158]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x15b4]
push edx
push eax
push ecx
call dword [esp + 0x54]
test eax, eax
je 0x12ffbc2e
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x12ffb962
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x50]
lea edx, [esp + 0x50]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x15ac]
push 0x1c
push edx
push eax
push ecx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jbe 0x12ffb92d
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x54]
cmp eax, edx
jne 0x12ffb933
mov edi, dword [esp + 0x50]
mov eax, dword [esp + 0x5c]
push 0x13183840
lea ebp, [eax + edi]
call fcn.12ffa080
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x12ffb8a5
xor esi, esi
jmp 0x12ffb905
cmp edi, ebp
jae 0x12ffb905
mov edx, dword [esp + 0x15ac]
push 0
lea ecx, [esp + 0x5ac]
push 0x1000
push ecx
push edi
push edx
call ebx
test eax, eax
je 0x12ffb905
and esi, 0xffff
lea ecx, [esp + 0x5a8]
mov eax, esi
mov edx, 0x800
xor esi, esi
mov si, word [ecx]
add ecx, 2
add eax, esi
mov esi, eax
and eax, 0xffff
shr esi, 0x10
add eax, esi
dec edx
jne 0x12ffb8db
mov esi, eax
add edi, 0x1000
shr esi, 0x10
add esi, eax
cmp edi, ebp
jb 0x12ffb8a9
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x5c]
lea edx, [esp + 0x50]
add eax, ecx
push 0x1c
push edx
push eax
mov eax, dword [esp + 0x15b8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
ja 0x12ffb873
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x15c]
cmp si, ax
sbb ecx, ecx
neg ecx
sub esi, ecx
sub esi, eax
mov eax, dword [esp + 0x15e]
cmp si, ax
sbb edx, edx
neg edx
sub esi, edx
sub esi, eax
cmp word [esp + 0x28], si
jne 0x12ffbc2e
push 0x13183848
call fcn.12ffa080
push 0x1318383c
mov esi, eax
call fcn.12ffa080
add esp, 8
mov ebx, eax
test esi, esi
je 0x12ffbc2e
test ebx, ebx
je 0x12ffbc2e
mov eax, dword [esp + 0x15ac]
push 4
push 0x1000
push 0x40c
push 0
push eax
call esi
mov ebp, eax
test ebp, ebp
je 0x12ffbc2e
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x1fc]
lea edx, [esp + 0x1fc]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x15ac]
lea ecx, [esp + 0x10]
push ecx
push 0x40
push edx
push ebp
push eax
mov dword [esp + 0x24], 0
mov word [esp + 0x210], 0x5a4d
mov dword [esp + 0x24c], 0x40
call ebx
test eax, eax
je 0x12ffbc2e
cmp dword [esp + 0x10], 0x40
jne 0x12ffbc2e
mov ecx, 0x3e
xor eax, eax
lea edi, [esp + 0x23c]
lea edx, [esp + 0x23c]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x15ac]
lea ecx, [esp + 0x10]
push ecx
lea esi, [ebp + 0x40]
push 0xf8
push edx
push esi
push eax
mov dword [esp + 0x250], 0x4550
mov word [esp + 0x264], 0xe0
mov word [esp + 0x266], 0x2000
mov word [esp + 0x256], 1
call ebx
test eax, eax
je 0x12ffbc2e
cmp dword [esp + 0x10], 0xf8
jne 0x12ffbc2e
mov edx, dword [0x13183afc]
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x50]
add esi, 0xf8
rep stosd dword es:[edi], eax
mov ecx, dword [str.tdetour]
mov eax, esi
mov dword [esp + 0x50], ecx
sub eax, ebp
lea ecx, [esp + 0x10]
mov dword [esp + 0x54], edx
add eax, 0x28
push ecx
lea edx, [esp + 0x54]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x15b0]
push 0x28
push edx
mov ebp, 0x2ac
push esi
push eax
mov dword [esp + 0x74], ebp
call ebx
test eax, eax
je 0x12ffbc2e
cmp dword [esp + 0x10], 0x28
jne 0x12ffbc2e
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0xc4]
lea edx, [esp + 0xc4]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
mov eax, 0x40
push ecx
add esi, 0x28
mov dword [esp + 0xc8], eax
mov dword [esp + 0xd0], eax
push eax
mov eax, dword [esp + 0x15b4]
push edx
push esi
push eax
mov dword [esp + 0xdc], 0x727444
mov dword [esp + 0xe4], ebp
call ebx
test eax, eax
je 0x12ffbc2e
cmp dword [esp + 0x10], 0x40
jne 0x12ffbc2e
mov ecx, 0x47
xor eax, eax
lea edi, [esp + 0x48c]
mov edx, dword [0x1307f49c]
rep stosd dword es:[edi], eax
mov ecx, dword [0x1307f498]
mov dword [esp + 0x490], eax
mov eax, dword [0x1307f4a0]
mov dword [esp + 0x494], ecx
mov ecx, dword [0x1307f4a4]
mov dword [esp + 0x49c], eax
mov eax, dword [esp + 0x15b0]
add esi, 0x40
test eax, eax
mov dword [esp + 0x48c], 0x26c
mov dword [esp + 0x498], edx
mov dword [esp + 0x4a0], ecx
je 0x12ffbbc7
mov ecx, dword [esp + 0x15b4]
test ecx, ecx
jbe 0x12ffbbc7
mov edx, dword [eax]
push 0x103
lea eax, [esp + 0x4a8]
push edx
push eax
call fcn.12f5c9d0
add esp, 0xc
mov eax, dword [esp + 0x15ac]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x490]
push 0x11c
push edx
push esi
push eax
call ebx
test eax, eax
je 0x12ffbc2e
cmp dword [esp + 0x10], 0x11c
jne 0x12ffbc2e
mov eax, dword [esp + 0x15ac]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x340]
push 0x150
add esi, 0x11c
push edx
push esi
push eax
call ebx
test eax, eax
je 0x12ffbc2e
cmp dword [esp + 0x10], 0x150
jne 0x12ffbc2e
mov dword [esp + 0x80], 1
mov ecx, dword [esp + 0x14]
push ecx
call fcn.12f5c050
add esp, 4
mov eax, dword [esp + 0x80]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x1598
ret
pop edi
xor eax, eax
pop esi
add esp, 0x1598
ret