Function at 0x10002ca0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10015e00
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x1001b080]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
push edi
mov eax, dword [0x1001b080]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
push 0
push 0x1001c244
or eax, 0xffffffff
mov edi, 0x101dcf88
call fcn.10001270
push 0x10
mov eax, str.GDB_facemap.txt
mov ecx, edi
call fcn.10001330
push 0
push 0x1001c244
or eax, 0xffffffff
mov edi, 0x101dcfa4
call fcn.10001270
push 0xe
mov eax, str.FaceLoader.log
mov ecx, edi
call fcn.10001330
cmp dword [0x101dcfc0], 0
jne 0x10002d2b
mov byte [0x101dcfe8], 1
mov eax, dword [0x101dcf88]
mov esi, 8
cmp dword [0x101dcf9c], esi
jae 0x10002d42
mov eax, 0x101dcf88
push 0x10018ab0
push eax
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 0
call fcn.1000722b
mov ebx, dword [esp + 0x20]
add esp, 0xc
test ebx, ebx
je 0x10002d7c
push 0x101dcfc0
call fcn.100040d0
mov ecx, dword [esp + 0x14]
push ecx
call fcn.100072df
add esp, 4
push 0x101dcff4
call dword [sym.imp.dsound.dll_void___cdecl_Get_GDB_DirA_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____]
mov eax, dword [0x101dcff4]
add esp, 4
cmp dword [0x101dd008], 0x10
jae 0x10002d9d
mov eax, 0x101dcff4
push eax
push str._PES2014faceloader_
push str._s_PluginDirA___s_n
call fcn.10006f34
add esp, 0xc
push 0x101dcff4
or eax, 0xffffffff
xor ebx, ebx
mov ecx, 0x101dd010
call fcn.10005f60
push 1
mov eax, 0x1001884c
mov ecx, 0x101dd010
call fcn.100033f0
push 9
mov eax, str.GDB_face_
mov ecx, 0x101dd010
call fcn.100033f0
mov eax, dword [0x101dcfa4]
cmp dword [0x101dcfb8], esi
jae 0x10002df8
mov eax, 0x101dcfa4
xor edi, edi
push edi
push 0x80
push 2
push edi
push 5
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x1001c1f8], eax
cmp eax, 0xffffffff
je 0x10002e3b
push edi
lea edx, [esp + 0x20]
push edx
push 3
lea ecx, [esp + 0x20]
push ecx
push eax
mov word [esp + 0x28], 0xbbef
mov byte [esp + 0x2a], 0xbf
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x100188b0
mov esi, 0x10018910
call fcn.10006340
add esp, 4
push str.Debug_log_begin
mov esi, 0x10018928
call fcn.10006340
add esp, 4
push 0x10018940
mov esi, 0x100189a0
call fcn.10006340
add esp, 4
cmp dword [0x101dcfd4], edi
jne 0x10002ec4
push str.Face_map_not_found._Exit.
mov esi, 0x100189b8
call fcn.10006340
mov eax, dword [0x1001c1f8]
add esp, 4
cmp eax, 0xffffffff
je 0x10002e9c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x1001c1f8], 0xffffffff
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.10006495
mov esp, ebp
pop ebp
ret
push 0x14
mov dword [esp + 0x2c], edi
call fcn.10006ce9
add esp, 4
cmp eax, edi
je 0x10003241
mov dword [eax], eax
mov dword [esp + 0x24], eax
mov dword [eax + 4], eax
push 0x101dcfc0
lea eax, [esp + 0x28]
mov dword [esp + 0x6c], edi
call fcn.100037a0
mov ebx, dword [esp + 0x24]
test al, al
je 0x10002f36
mov eax, dword [ebx]
mov dword [esp + 0x18], eax
cmp eax, ebx
je 0x10002f36
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 8]
push 0x100189e8
push eax
call fcn.10006ff1
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x10002fa4
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
mov dword [esp + 0x18], eax
cmp eax, ebx
jne 0x10002f07
push str.Debug_log_end.
mov esi, str.Faceloader
call fcn.10006340
mov eax, dword [0x1001c1f8]
add esp, 4
cmp eax, 0xffffffff
je 0x10002f59
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x10002930
push 1
mov dword [0x1001c1f8], 0xffffffff
call dword [sym.imp.dsound.dll_void___cdecl_AddCallChain_enum_HOOKS__void__]
mov eax, dword [ebx]
add esp, 8
mov dword [ebx], ebx
mov dword [ebx + 4], ebx
cmp eax, ebx
je 0x10002f91
mov edi, edi
mov esi, dword [eax]
push eax
call fcn.10006c8d
add esp, 4
mov eax, esi
cmp esi, ebx
jne 0x10002f80
push ebx
call fcn.10006c8d
add esp, 4
jmp 0x10002ea6
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
push eax
call fcn.100070b5
mov edi, eax
add esp, 4
test edi, edi
je 0x10002f28
push edi
push 0x100189ec
mov esi, 0x10018a10
call fcn.10006340
push 0x10018a28
and edi, 0xffff
push 0
mov dword [esp + 0x30], edi
call fcn.10006ff1
add esp, 0x10
mov dword [esp + 0x14], eax
test eax, eax
je 0x10002f28
dec edi
cmp edi, 0xfffd
ja 0x10002fa4
xor ecx, ecx
mov word [esp + 0x3c], cx
mov ecx, eax
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], 0
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x10003015
sub ecx, esi
sar ecx, 1
push ecx
lea ecx, [esp + 0x40]
call fcn.10001410
mov edi, 4
lea ebx, [esp + 0x3c]
mov byte [esp + 0x68], 1
call fcn.10003380
mov esi, dword [esp + 0x4c]
inc eax
or edi, 0xffffffff
cmp esi, eax
jb 0x10003237
mov ecx, esi
sub ecx, eax
cmp ecx, 0xffffffff
jae 0x10003060
mov edi, ecx
test edi, edi
je 0x100030bc
mov ecx, dword [esp + 0x50]
mov ebx, dword [esp + 0x3c]
mov edx, ebx
cmp ecx, 8
jae 0x100030b8
lea edx, [esp + 0x3c]
mov ecx, edx
sub esi, edi
sub esi, eax
add esi, esi
push esi
lea esi, [edi + eax]
lea edx, [edx + esi*2]
push edx
lea eax, [ecx + eax*2]
push eax
call fcn.100065e0
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x48]
sub eax, edi
mov ebx, 8
add esp, 0xc
mov dword [esp + 0x4c], eax
cmp dword [esp + 0x50], ebx
jae 0x100030ac
lea ecx, [esp + 0x3c]
xor edx, edx
mov word [ecx + eax*2], dx
mov esi, dword [esp + 0x4c]
jmp 0x100030c1
mov ecx, ebx
jmp 0x10003075
mov ebx, 8
lea eax, [esp + 0x3c]
push eax
mov edi, 4
call fcn.100032f0
mov edi, eax
cmp esi, edi
jae 0x100030d8
mov edi, esi
test edi, edi
je 0x10003125
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x3c]
mov ecx, eax
cmp edx, ebx
jae 0x100030f0
lea ecx, [esp + 0x3c]
mov eax, ecx
sub esi, edi
lea edx, [esi + esi]
push edx
lea ecx, [ecx + edi*2]
push ecx
push eax
call fcn.100065e0
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x48]
sub eax, edi
add esp, 0xc
mov dword [esp + 0x4c], eax
cmp dword [esp + 0x50], ebx
jae 0x1000311b
lea ecx, [esp + 0x3c]
xor edx, edx
mov word [ecx + eax*2], dx
mov esi, dword [esp + 0x4c]
test esi, esi
je 0x10003216
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x50], ebx
jae 0x1000313b
lea eax, [esp + 0x3c]
cmp word [eax + esi*2 - 2], 0x22
jne 0x10003156
lea ecx, [esi - 1]
or eax, 0xffffffff
lea esi, [esp + 0x3c]
call fcn.10001520
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x50], ebx
jae 0x10003164
lea eax, [esp + 0x3c]
cmp word [eax], 0x22
jne 0x1000317e
mov eax, 1
xor ecx, ecx
lea esi, [esp + 0x3c]
call fcn.10001520
mov esi, dword [esp + 0x4c]
test esi, esi
je 0x10003216
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x50], ebx
jae 0x10003194
lea eax, [esp + 0x3c]
push eax
call fcn.10001ef0
mov ecx, eax
add esp, 4
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x100031a2
mov edx, dword [esp + 0x20]
sub ecx, esi
lea esi, [edx*8]
sub esi, edx
lea esi, [esi*4 + 0x1001cfa0]
mov edi, ecx
call fcn.10006040
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x50], ebx
jae 0x100031d4
lea eax, [esp + 0x3c]
push eax
push 0x10018a2c
mov esi, 0x10018a38
call fcn.10006340
sub esp, 0x14
mov edi, esp
xor eax, eax
mov dword [esp + 0x3c], esp
push eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
lea ecx, [esp + 0x5c]
mov word [edi], ax
push ecx
or eax, 0xffffffff
call fcn.10001270
call fcn.10002b00
add esp, 0x1c
mov byte [esp + 0x68], 0
cmp dword [esp + 0x50], ebx
jb 0x10002fa0
mov edx, dword [esp + 0x3c]
push edx
call fcn.10006c8d
add esp, 4
jmp 0x10002fa0
push str.invalid_string_position
call fcn.1000641c
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x34]
mov dword [esp + 0x20], edi
call fcn.1000652c
push 0x100193a0
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x38], vtable.std::bad_alloc.0
call fcn.1000809a
int3