Function at 0x460a32
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
xor ebx, ebx
push 0x1a8
push ebx
call edi
mov esi, eax
cmp esi, ebx
je 0x460a7e
push 0xa4
push ebx
push esi
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebp + 0x18], ebx
je 0x460a90
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push ebx
call edi
cmp eax, ebx
mov dword [esi + 0x30], eax
jne 0x460a86
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 2
pop edi
jmp 0x460d94
push dword [ebp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp + 0x14]
or dword [esi + 0x24], 0xffffffff
and eax, 0x3fffffff
dec eax
je 0x460b32
dec eax
je 0x460ad8
dec eax
dec eax
jne 0x460b98
push 2
lea edi, [esi + 4]
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push edi
call ebx
push eax
push dword [ebp + 0xc]
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
xor ebx, ebx
test eax, eax
je 0x460b11
mov eax, dword [ebp + 0xc]
mov dword [edi], eax
jmp 0x460b17
push ebx
push 0x80
push 3
mov eax, accept
test dword [ebp + 0x14], eax
push ebx
push 1
push eax
lea edi, [esi + 4]
push dword [ebp + 0xc]
je 0x460afc
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x460b02
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [edi], eax
jne 0x460b11
xor edi, edi
inc edi
jmp 0x460d8d
mov dword [esi], 2
push 1
push ebx
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
jne 0x460b98
push 0x10
jmp 0x460d8c
mov eax, dword [ebp + 0xc]
cmp eax, ebx
mov dword [esi + 4], eax
je 0x460b41
mov eax, dword [ebp + 0x10]
jmp 0x460b8f
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
push 0xa
movzx eax, word [ebp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
mov dword [ebp + 0xc], eax
je 0x460d8a
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
je 0x460d8a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebx
mov dword [esi + 4], eax
je 0x460d19
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi + 0x10], eax
mov dword [esi], 1
test byte [esi], 1
jne 0x460bb4
push 2
push ebx
push ebx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
sub edi, dword [esi + 0xc]
mov dword [ebp + 0x14], edi
jmp 0x460bbf
mov eax, dword [esi + 0x10]
mov dword [esi + 0x14], eax
mov dword [ebp + 0x14], eax
mov edi, eax
mov eax, 0xffff
cmp edi, eax
mov dword [ebp + 0xc], eax
jae 0x460bce
mov dword [ebp + 0xc], edi
push 0x404
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebx
mov dword [ebp + 0x10], eax
je 0x460d19
push 4
pop eax
cmp dword [ebp + 0xc], eax
jbe 0x460c6c
jmp 0x460bf5
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
add eax, 0x400
cmp eax, ecx
mov dword [ebp + 0x18], ecx
ja 0x460c07
mov dword [ebp + 0x18], eax
mov ebx, edi
mov eax, 0x404
sub ebx, dword [ebp + 0x18]
sub edi, ebx
cmp edi, eax
jbe 0x460c19
mov edi, eax
push 0
push ebx
push esi
call fcn.00460224
add esp, 0xc
test eax, eax
jne 0x460c6a
push edi
push dword [ebp + 0x10]
push esi
call fcn.0045fc69
add esp, 0xc
test eax, eax
je 0x460c6a
add edi, 0xfffffffd
jmp 0x460c5e
mov eax, dword [ebp + 0x10]
dec edi
cmp byte [edi + eax], 0x50
jne 0x460c5e
cmp byte [edi + eax + 1], 0x4b
jne 0x460c5e
cmp byte [edi + eax + 2], 5
jne 0x460c5e
cmp byte [edi + eax + 3], 6
je 0x460c7a
test edi, edi
jge 0x460c3f
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 0x18], eax
jb 0x460bef
xor ebx, ebx
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x460d1d
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
add ebx, edi
push 0
push ebx
push esi
call fcn.00460224
push esi
call fcn.004609c6
push esi
call fcn.00460d9b
push esi
mov dword [ebp + 0xc], eax
call fcn.00460d9b
push esi
mov edi, eax
call fcn.00460d9b
movzx eax, ax
push esi
mov dword [esi + 0x18], eax
call fcn.00460d9b
add esp, 0x20
cmp dword [esi + 8], 0
jne 0x460d34
movzx eax, ax
cmp eax, dword [esi + 0x18]
jne 0x460d15
test di, di
jne 0x460d15
cmp word [ebp + 0xc], di
jne 0x460d15
push esi
call fcn.004609c6
mov edi, eax
push esi
mov dword [ebp + 0xc], edi
call fcn.004609c6
push esi
mov dword [esi + 0x2c], eax
call fcn.00460d9b
movzx eax, ax
add esp, 0xc
cmp dword [esi + 8], 0
mov dword [esi + 0x1c], eax
jne 0x460d34
mov ecx, dword [esi + 0x2c]
mov eax, dword [esi + 0xc]
lea edx, [ecx + edi]
lea edi, [eax + ebx]
cmp edi, edx
jb 0x460d34
sub eax, ecx
sub eax, dword [ebp + 0xc]
add eax, ebx
xor ebx, ebx
jmp 0x460d4e
push 8
jmp 0x460d8c
push 2
jmp 0x460d8c
push ebx
push ebx
push esi
call fcn.00460224
push esi
call fcn.00460d9b
add esp, 0x10
cmp ax, 0x8b1f
je 0x460d38
push 6
jmp 0x460d8c
mov eax, dword [esi + 0xc]
or dword [esi], 4
mov dword [esi + 8], ebx
mov dword [esi + 0x18], 1
lea ecx, [eax + 3]
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x20], eax
lea eax, [esi + 0xa4]
push eax
push 0x103
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp eax, ebx
je 0x460d71
cmp byte [eax + esi + 0xa3], 0x5c
je 0x460d81
add eax, esi
mov byte [eax + 0xa4], 0x5c
and byte [eax + 0xa5], 0
mov eax, dword [ebp + 8]
mov dword [eax], esi
xor eax, eax
jmp 0x460d96
push 4
pop edi
push esi
call fcn.004602c5
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret