Function at 0x10005308
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10005702
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], ebx
mov ebx, dword [0x10065658]
test ebx, ebx
je 0x10005382
mov eax, dword [0x100657c0]
test eax, eax
je 0x10005382
je 0x1000534e
mov eax, dword [ebx]
test eax, eax
je 0x100054f4
mov eax, dword [0x100657b0]
test eax, eax
je 0x10005362
mov eax, dword [ebx + 4]
test eax, eax
je 0x10005550
push dword [0x100630dc]
push 0x10055160
push dword [ebx]
call fcn.10046d47
add esp, 0xc
call fcn.10048be3
mov ebx, dword [0x10065658]
test ebx, ebx
je 0x10005398
lea eax, [ebp + 8]
push 4
push eax
mov ecx, ebx
push str.IDirect3DSurface9P
call fcn.1002c134
mov eax, dword [ebp + 8]
test eax, eax
je 0x100056e0
push dword [eax + 4]
mov edx, dword [eax + 8]
call dword [edx + 0x38]
mov ecx, dword [0x10065658]
mov dword [0x10065660], eax
test ecx, ecx
je 0x100053cc
push 4
push 0x10065660
push str.HRESULT
call fcn.1002c134
mov eax, dword [0x10065708]
test eax, eax
je 0x10005427
push str.3da_extra9.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x1000565d
push 0x10056ee4
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x10005419
mov edx, dword [0x10065668]
test edx, edx
je 0x10005419
push dword [0x10061640]
mov ecx, dword [ebp + 8]
add ecx, 4
push dword [edx + 4]
push ecx
call eax
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
add dword [0x10061640], 1
mov eax, dword [0x10065718]
test eax, eax
je 0x100054d6
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x30]
mov ebx, dword [ecx + 8]
xor eax, eax
push eax
push eax
push edx
push dword [ecx + 4]
call dword [ebx + 0x34]
mov dword [0x10065660], eax
mov dword [ebp - 4], 0
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 8]
lea eax, [ebp - 0x50]
push eax
push dword [edx + 4]
call dword [ecx + 0x30]
mov dword [0x10065660], eax
mov eax, dword [ebp - 0x48]
cmp eax, 2
je 0x100054bb
cmp eax, 1
je 0x100054bb
mov ebx, dword [0x100656f8]
mov esi, dword [ebp - 0x2c]
mov byte [esi], bl
mov ecx, dword [0x100656f8]
mov eax, dword [ebp - 0x30]
imul eax, dword [ebp - 0x34]
lea edi, [ecx + 1]
xor edx, edx
div edi
mov edx, dword [ebp - 0x2c]
mov byte [eax + edx], cl
mov ebx, dword [ebp - 0x30]
cmp ebx, 1
jle 0x100054a9
add ebx, 0xffffffff
mov dword [ebp - 0x30], ebx
mov ecx, dword [0x100656f8]
mov eax, ecx
xor edx, edx
div ebx
mov ebx, dword [ebp - 0x2c]
mov byte [edx + ebx], cl
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
push dword [edx + 4]
mov ecx, dword [eax + 8]
call dword [ecx + 0x38]
mov dword [0x10065660], eax
mov eax, dword [0x10065660]
mov edi, dword [ebp - 0x28]
mov esi, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov dword [ebx + 0x118], 0
push 0x10063940
push str._slog_DX9.out
push 0x10065f20
call fcn.1004665a
push 0x10054e68
push 0x10065f20
call fcn.1004670e
add esp, 0x14
mov dword [ebx], eax
test eax, eax
jne 0x1000534e
push 0x10
push 0x1005456c
push str.fopen
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
push eax
push eax
call fcn.100468bc
jmp 0x1000534e
lea eax, [ebx + 0x108]
mov dword [ebp - 0x1c], eax
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
movzx esi, word [ebx + 0x10e]
movzx ecx, word [ebx + 0x10a]
movzx edx, word [ebx + 0x110]
movzx eax, word [ebx + 0x112]
lea edi, [ebx + 8]
mov dword [ebp - 0x14], ebx
movzx ebx, word [ebx + 0x114]
mov dword [ebp - 0x18], edi
push ebx
mov ebx, dword [ebp - 0x14]
push eax
push edx
push ecx
push esi
push 0x10063940
push str._sPerflogDX__d__d__d._d._d.csv
push edi
call fcn.1004665a
push 0x10054e68
mov eax, edi
push eax
call fcn.1004670e
add esp, 0x28
mov dword [ebx + 4], eax
test eax, eax
je 0x100055db
push eax
push str.used_vram___vram_usage_of_texture__vertex_data_nfps___frames_per_second_npps___polys_per_second_nppf___polys_fer_frame_noverdraw___effective_overdraw_per_frame_nstrst___IDirect3DDevice9::SetRenderState_per_frame_nsttxstgst___IDirect3DDevice9::SetTextureStageState_per_frame_nppc___polys_per_DrawPrimitve_nsttx___IDirect3DDevice9::SetTexture_per_frame_nstvp___IDirect3DDevice9::SetViewport_per_frame_nsvs___IDirect3DDevice9::SetVertexShader_per_frame_nsss___IDirect3DDevice9::SetStreamSource_per_frame_n_n
call fcn.100468f6
push dword [ebx + 4]
push str._used_vram___fps___pps___ppf___overdraw___strst___sttxstgst___ppc___sttx___stvp___svs___sss__n_n
call fcn.100468f6
add esp, 0x10
jmp 0x10005362
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
movzx ecx, word [ebx + 0x10e]
movzx edi, word [ebx + 0x10a]
movzx esi, word [ebx + 0x110]
movzx edx, word [ebx + 0x112]
movzx eax, word [ebx + 0x114]
push eax
mov eax, dword [ebp - 0x18]
push edx
push esi
push edi
push ecx
push 0x10063940
push str._sPerflogDX__d__d__d._d._d.csv
push eax
call fcn.1004665a
push 0x10054e68
mov eax, dword [ebp - 0x18]
push eax
call fcn.1004670e
add esp, 0x28
mov dword [ebx + 4], eax
test eax, eax
jne 0x100055bb
push 0x10
push 0x1005456c
push str.fopen
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
push eax
push eax
call fcn.100468bc
mov eax, dword [ebx + 4]
jmp 0x100055bb
push str.EXTRAS9
mov esi, dword [0x100657c8]
push 0x7b
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x100056c6
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
xor edx, edx
push edx
push 0x80
push 2
push edx
push edx
push 0x40000000
push str.3da_extra9.dll
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
lea edx, [ebp - 0x54]
push 0
push edx
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.3da_extra9.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
jne 0x100053ea
jmp 0x10005420
mov edi, dword [ebp - 0x28]
mov esi, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4