Function at 0x10003820
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100181e0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x10021300]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [0x10021300]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov esi, 0x10963100
cmp esi, 0x10022288
je 0x10003874
push 0xffffffffffffffff
push 0
push 0x10022288
mov ecx, esi
call fcn.10001f30
push 0x10
push str.GDB_facemap.txt
mov ecx, esi
call fcn.10001a80
mov edi, 0x10963118
cmp edi, 0x10022288
je 0x1000389f
push 0xffffffffffffffff
push 0
push 0x10022288
mov ecx, edi
call fcn.10001f30
push 0xe
push str.FaceLoader.log
mov ecx, edi
call fcn.10001a80
movzx eax, byte [0x1096314c]
cmp dword [0x10963130], 0
mov ecx, 1
cmove eax, ecx
cmp dword [0x10963114], 8
push 0x1001eedc
cmovae esi, dword [0x10963100]
mov byte [0x1096314c], al
lea eax, [esp + 0x1c]
push esi
push eax
mov byte [0x1096314d], cl
mov dword [esp + 0x24], 0
call fcn.10009b5d
mov eax, dword [esp + 0x24]
add esp, 0xc
test eax, eax
je 0x10003916
push eax
mov ecx, 0x10963130
call fcn.10004b30
push dword [esp + 0x18]
call fcn.10009cd8
add esp, 4
push 0x10963158
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____]
add esp, 4
cmp dword [0x1096316c], 0x10
mov eax, 0x10963158
cmovae eax, dword [0x10963158]
push eax
push str._PES2014faceloader_
push str._s_PluginDirA___s_n
call fcn.10008d57
add esp, 0xc
mov ecx, 0x10963170
push 0xffffffffffffffff
push 0
push 0x10963158
call fcn.10001c60
push 1
push 0x1001ec74
mov ecx, 0x10963170
call fcn.10003ee0
push 9
push str.GDB_face_
mov ecx, 0x10963170
call fcn.10003ee0
cmp dword [0x1096312c], 8
push 0
cmovae edi, dword [0x10963118]
push 0x80
push 2
push 0
push 5
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x10022240], eax
cmp eax, 0xffffffff
je 0x100039d1
push 0
lea ecx, [esp + 0x38]
push ecx
push 3
lea ecx, [esp + 0x24]
push ecx
push eax
mov word [esp + 0x2c], 0xbbef
mov byte [esp + 0x2e], 0xbf
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x1001eca8
push 0x1001ed08
call fcn.100069c0
push str.Debug_log_begin
push 0x1001ed20
call fcn.100069c0
push 0x1001ed38
push 0x1001ed98
call fcn.100069c0
add esp, 0x18
cmp dword [0x10963140], 0
jne 0x10003a3e
push str.Face_map_not_found._Unload.
push 0x1001ede8
call fcn.100069c0
mov eax, dword [0x10022240]
add esp, 8
cmp eax, 0xffffffff
je 0x10003a2d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10022240], 0xffffffff
xor al, al
jmp 0x10003ccc
push 0
push 0
mov dword [esp + 0x1c], 0
call fcn.10004110
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
sub esp, 8
mov ecx, 0x10963130
mov dword [esp + 0x54], 0
call fcn.10004200
mov ebx, dword [esp + 0x10]
test al, al
je 0x10003c65
mov esi, dword [ebx]
cmp esi, ebx
je 0x10003c65
lea eax, [esp + 0x18]
push eax
push 0x1001eca4
push dword [esi + 8]
call fcn.100099bf
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x10003c57
push ebx
call fcn.10009a92
mov edi, eax
add esp, 4
test edi, edi
je 0x10003ac4
push edi
push str.Assign_face___d_
push 0x1001ee3c
call fcn.100069c0
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push 0x1001ee54
push 0
and edi, 0xffff
call fcn.100099bf
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x10003c57
lea eax, [edi - 1]
cmp eax, 0xfffd
ja 0x10003aa2
xor eax, eax
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
cmp word [ebx], ax
je 0x10003b22
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10003b13
sub eax, edx
sar eax, 1
push eax
push ebx
lea ecx, [esp + 0x24]
call fcn.10001b60
xor ecx, ecx
mov byte [esp + 0x48], 1
cmp word [0x1001eec4], cx
mov eax, 4
cmove eax, ecx
push eax
sub esp, 8
lea ecx, [esp + 0x28]
call fcn.10003e70
lea ecx, [eax + 1]
cmp dword [esp + 0x2c], ecx
jb 0x10003cea
cmp dword [esp + 0x30], 8
lea eax, [esp + 0x1c]
cmovae eax, dword [esp + 0x1c]
mov dword [esp + 0x2c], ecx
xor edx, edx
mov word [eax + ecx*2], dx
xor ecx, ecx
cmp word [0x1001eec4], cx
mov eax, 4
cmove eax, ecx
push eax
sub esp, 8
lea ecx, [esp + 0x28]
call fcn.10003df0
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.10002270
cmp dword [esp + 0x2c], 0
je 0x10003c36
lea ecx, [esp + 0x1c]
call fcn.10003d00
cmp dword [esp + 0x2c], 0
je 0x10003c36
cmp dword [esp + 0x30], 8
lea ecx, [esp + 0x1c]
cmovae ecx, dword [esp + 0x1c]
call fcn.100029b0
mov edx, eax
cmp byte [edx], 0
jne 0x10003bdb
xor ecx, ecx
jmp 0x10003bef
mov ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x34], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10003be4
sub ecx, dword [esp + 0x34]
push ecx
lea eax, [edi + edi*2]
push edx
lea ecx, [eax*8 + 0x107e3118]
call fcn.10001970
cmp dword [esp + 0x30], 8
lea eax, [esp + 0x1c]
cmovae eax, dword [esp + 0x1c]
push eax
push 0x1001ee58
push 0x1001ee64
call fcn.100069c0
add esp, 0xc
cmp dword [esp + 0x30], 8
lea edx, [esp + 0x1c]
cmovae edx, dword [esp + 0x1c]
mov ecx, edi
call fcn.10003330
mov byte [esp + 0x48], 0
cmp dword [esp + 0x30], 8
jb 0x10003aa2
push dword [esp + 0x1c]
call fcn.100097b2
add esp, 4
jmp 0x10003aa2
mov esi, dword [esi]
mov ebx, dword [esp + 0x10]
cmp esi, ebx
jne 0x10003a83
push str.Debug_log_end.
push str.Faceloader
call fcn.100069c0
mov eax, dword [0x10022240]
add esp, 8
cmp eax, 0xffffffff
je 0x10003c88
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x10003160
push 1
mov dword [0x10022240], 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 0x10003cc1
lea ecx, [ecx]
mov esi, dword [eax]
push eax
call fcn.100097b2
add esp, 4
mov eax, esi
cmp esi, ebx
jne 0x10003cb0
push ebx
call fcn.100097b2
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.10008d17
mov esp, ebp
pop ebp
ret
push str.invalid_string_position
call fcn.10006ba2
int3