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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x489efd
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4b0070]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x20], ebx
push 0x49afec
push 0x81
push dword [0x4b3054]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x41059a
push esi
push dword [0x4b3054]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x41059a
push esi
push dword [0x4b3054]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [ebx + 0x328]
sub ecx, 0x10
mov dword [ebp - 0x1c], eax
call fcn.00403340
add eax, 0x10
mov dword [ebp - 0x10], eax
push 0x13
push str.4399ExtraceTool.exe
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 0
call fcn.0040c610
mov esi, dword [ebp - 0x10]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
or ebx, 0xffffffff
cmp edi, ebx
je 0x410568
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x410561
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x14], eax
jne 0x410561
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x49afec
push 0x83
push dword [0x4b3054]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x410568
push edi
push dword [0x4b3054]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x410568
push edi
push dword [0x4b3054]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, dword [ebp - 0x20]
add esi, 0xfffffff0
mov dword [ebp - 0x1c], eax
mov edx, dword [edx + 0x328]
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x4104f7
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x4104eb
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x4104eb
call fcn.00403340
mov dword [ebp - 0x20], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x4104e3
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x20]
add eax, 0x10
mov dword [ebp - 0x10], eax
jmp 0x4104f7
push dword [edx - 0xc]
lea ecx, [ebp - 0x10]
push edx
call fcn.00402220
push 0x14
push str.4399InstallPacket.7z
lea ecx, [ebp - 0x10]
call fcn.0040c610
mov esi, dword [ebp - 0x10]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x410568
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x410557
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x14], eax
jne 0x410557
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
mov edi, 1
jmp 0x41056a
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
jmp 0x410568
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x410586
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret