Function at 0x10002010
Capabilities:
Check if file exists
Create thread
Get file attributes
Link many functions at runtime
Set environment variable

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 1
push esi
jne 0x10002283
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push ebx
push edi
push 0x1000
push 0
call esi
push 0x1000
push 0
mov ebx, eax
call esi
push 0x1000
mov edi, eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea esi, [edi + eax]
cmp esi, edi
jbe 0x1000205e
cmp byte [esi], 0x5c
je 0x1000205d
dec esi
cmp esi, edi
ja 0x10002051
jmp 0x1000205e
inc esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push esi
push str._s:_d_
push ebx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x10
mov dword [section..data], ebx
push str.PangyaUS.ini
call edi
cmp eax, 0xffffffff
jne 0x100020d4
push str.PangyaJP.ini
call edi
cmp eax, 0xffffffff
je 0x100020a0
mov eax, 0x100018a0
jmp 0x100020d9
push str.PangyaTH.ini
call edi
cmp eax, 0xffffffff
je 0x100020d4
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
push 0
push str.rugburn
push str.No_GameGuard_patch_is_available_for_PangyaTH.
push 0
call esi
push 0
push str.rugburn
push str.It_looks_like_no_patch_exists_for_this_version_of_PangYa._nThe_game_will_likely_exit_a_couple_minutes_after_detecting_GameGuard_is_not_present.
push 0
call esi
jmp 0x100020ea
mov eax, 0x100015b0
push 0
push 0
push 0
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x10006008], 0
jne 0x1000228d
push str.ijl15_real
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x10002297
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x100042d8
push eax
mov dword [0x10006008], eax
call esi
test eax, eax
je 0x100022ad
push 0x100042ec
push dword [0x10006008]
mov dword [0x1000601c], eax
call esi
test eax, eax
je 0x100022c3
push 0x100042f4
push dword [0x10006008]
mov dword [0x10006018], eax
call esi
test eax, eax
je 0x100022d9
push 0x100042fc
push dword [0x10006008]
mov dword [0x10006014], eax
call esi
test eax, eax
je 0x100022ef
push 0x10004304
push dword [0x10006008]
mov dword [0x10006010], eax
call esi
test eax, eax
je 0x10002305
push 0x10004310
push dword [0x10006008]
mov dword [0x1000600c], eax
call esi
test eax, eax
je 0x1000231b
push 0x288
push 0
push 0x10006060
mov dword [0x10006004], eax
call sub.msvcrt.dll_memset
add esp, 0xc
call fcn.10002460
mov ecx, dword [0x10006260]
push str.PangyaUS.ini
mov dword [ecx*8 + 0x10006060], eax
mov ecx, 0x2777
mov eax, dword [0x10006260]
mov dword [eax*8 + 0x10006064], 0x100041fc
mov eax, dword [0x100062e4]
inc dword [0x10006260]
mov word [eax*8 + 0x10006264], cx
mov ecx, 0x2775
mov eax, dword [0x100062e4]
mov word [eax*8 + 0x10006266], cx
mov eax, dword [0x100062e4]
mov dword [eax*8 + 0x10006268], 0x1000421c
inc dword [0x100062e4]
call edi
cmp eax, 0xffffffff
jne 0x10002254
push str.PangyaJP.ini
call edi
cmp eax, 0xffffffff
je 0x10002241
push str.E69B65A2_7A7E_4977_85E5_B19516D885CB
jmp 0x10002259
push str.PangyaTH.ini
call edi
cmp eax, 0xffffffff
je 0x10002254
push str.E69B65A2_7A7E_4977_85E5_B19516D885CB
jmp 0x10002259
push str.2D0FA24B_336B_4e99_9D30_3116331EFDA0
call dword [sym.imp.SHLWAPI.dll_StrDupA]
mov esi, eax
push esi
push str.PANGYA_ARG
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
pop edi
pop ebx
test eax, eax
je 0x10002331
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
call fcn.10002c60
mov eax, 1
pop esi
pop ebp
ret 0xc
push str.Error:_ijl15_is_already_initialized_
call fcn.10001000
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ijl15_real
push str.Could_not_load_module__s___08x_
call fcn.10001000
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x100042d8
push str.Could_not_load_proc__s___08x_
call fcn.10001000
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x100042ec
push str.Could_not_load_proc__s___08x_
call fcn.10001000
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x100042f4
push str.Could_not_load_proc__s___08x_
call fcn.10001000
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x100042fc
push str.Could_not_load_proc__s___08x_
call fcn.10001000
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10004304
push str.Could_not_load_proc__s___08x_
call fcn.10001000
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10004310
push str.Could_not_load_proc__s___08x_
call fcn.10001000
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Couldnt_set_PANGYA_ARG___08x_
call fcn.10001000
int3