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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x101a4c2c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, edx
mov edi, ecx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], edx
test edi, edi
je 0x10128cba
cmp dword [edi], 0x666e7469
jne 0x10128cba
test byte [edi + 0x224], 2
je 0x10128cba
mov eax, dword [edi + 0x21c]
imul ebx, esi, 0x24
push 0x24
pop ecx
push 0x46
mov dword [ebx + eax], 0x43455246
mov eax, dword [edi + 0x21c]
mov word [ebx + eax + 4], cx
mov eax, dword [edi + 0x21c]
mov word [ebx + eax + 6], si
mov ecx, dword [edi + 0x21c]
mov ax, word [edx + 0x30]
mov word [ebx + ecx + 8], ax
mov eax, dword [edi + 0x21c]
pop ecx
push 0
mov word [ebx + eax + 0xa], cx
mov eax, dword [edi + 0x21c]
mov dword [ebx + eax + 0xc], 0x4946544e
mov ecx, dword [edi + 0x21c]
mov esi, dword [edx + 0x34]
mov eax, dword [edi + 0x220]
mov dword [ebx + ecx + 0x10], eax
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push esi
push dword [edi + 0x214]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10128cba
mov eax, dword [ebp - 0x18]
add eax, 3
add eax, dword [edi + 0x220]
push 0
and eax, 0xfffffffc
push 0
push eax
push dword [edi + 0x214]
mov dword [edi + 0x220], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp - 0x1c]
mov dword [edi + 0x220], eax
mov eax, dword [edi + 0x21c]
and dword [ebx + eax + 0x14], 0
mov ecx, dword [edi + 0x21c]
mov eax, dword [edi + 0x220]
mov dword [ebx + ecx + 0x18], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [edi + 0x214]
add eax, 0xc
push eax
call fcn.100f1e61
mov ecx, eax
mov dword [ebp - 0x18], ecx
test ecx, ecx
je 0x10128cba
mov eax, dword [edi + 0x220]
add eax, 3
push 0
add eax, ecx
and eax, 0xfffffffc
push 0
push eax
push dword [edi + 0x214]
mov dword [edi + 0x220], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor ecx, ecx
mov dword [edi + 0x220], eax
xor edx, edx
cmp dword [edi + 0x230], ecx
jbe 0x10128afb
mov eax, dword [edi + 0x21c]
mov esi, dword [edi + 0x22c]
movzx eax, word [ebx + eax + 8]
cmp word [esi + ecx*8], ax
je 0x10128af7
inc ecx
cmp ecx, dword [edi + 0x230]
jb 0x10128ae6
jmp 0x10128afb
mov edx, dword [esi + ecx*8 + 4]
mov eax, dword [edi + 0x21c]
xor esi, esi
test edx, edx
jne 0x10128c4d
movzx ecx, word [ebx + eax + 8]
test cx, cx
jle 0x10128b52
push 0x103
push ecx
push dword [0x101a5fbc]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x10128cba
push esi
push dword [0x101a5fbc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0x21c]
jmp 0x10128b57
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
test ecx, ecx
je 0x10128c45
push 0x10
pop ecx
push esi
push dword [0x101a5fbc]
mov dword [ebp - 0x14], 0x54544344
mov word [ebp - 0x10], cx
mov ax, word [ebx + eax + 8]
mov word [ebp - 0xe], ax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [edi + 0x21c]
xor esi, esi
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x220]
push esi
mov dword [ebp - 8], esi
mov dword [ebx + ecx + 0x1c], eax
lea eax, [ebp - 0x18]
push eax
push 0x10
lea eax, [ebp - 0x14]
push eax
push dword [edi + 0x214]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10128cba
push esi
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x1c]
push dword [edi + 0x214]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10128cba
mov eax, dword [edi + 0x21c]
mov edx, dword [edi + 0x230]
mov ecx, dword [edi + 0x22c]
push esi
mov ax, word [ebx + eax + 8]
push esi
mov word [ecx + edx*8], ax
mov edx, dword [edi + 0x230]
mov ecx, dword [edi + 0x22c]
mov eax, dword [edi + 0x220]
mov dword [ecx + edx*8 + 4], eax
mov eax, dword [edi + 0x218]
inc dword [edi + 0x230]
inc dword [eax + 0x10]
mov eax, dword [ebp - 0x18]
add eax, 0x13
add eax, dword [edi + 0x220]
and eax, 0xfffffffc
push eax
push dword [edi + 0x214]
mov dword [edi + 0x220], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [edi + 0x220], eax
jmp 0x10128c51
xor esi, esi
mov dword [ebx + eax + 0x1c], esi
jmp 0x10128c51
mov dword [ebx + eax + 0x1c], edx
mov ecx, dword [edi + 0x21c]
mov eax, dword [edi + 0x220]
mov dword [ebx + ecx + 0x20], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [edi + 0x214]
mov edx, dword [eax + 4]
test edx, edx
jne 0x10128c7b
lea edx, [eax + 0x5c]
call fcn.100f1edb
jmp 0x10128c83
push dword [eax + 8]
call fcn.100f1f7e
mov ecx, eax
mov dword [ebp - 0x18], ecx
test ecx, ecx
je 0x10128cba
mov eax, dword [edi + 0x220]
add eax, 3
push esi
add eax, ecx
and eax, 0xfffffffc
push esi
push eax
push dword [edi + 0x214]
mov dword [edi + 0x220], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [edi + 0x220], eax
xor eax, eax
inc eax
jmp 0x10128cbc
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10166ce0
mov esp, ebp
pop ebp
ret 4