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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0x2a4
xor ebx, ebx
push ebx
call edi
mov esi, eax
cmp esi, ebx
je 0x40300d
push 0xa4
push ebx
push esi
call fcn.0050c7f0
add esp, 0xc
cmp dword [ebp + 0x18], ebx
je 0x40301f
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push ebx
call edi
mov dword [esi + 0x30], eax
cmp eax, ebx
jne 0x403015
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 2
pop edi
jmp 0x403373
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, 0x3ffffff7
dec eax
je 0x4030c1
dec eax
je 0x403067
dec eax
dec eax
jne 0x403127
push 2
push ebx
push ebx
lea edi, [esi + 4]
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x4030a0
mov eax, dword [ebp + 0xc]
mov dword [edi], eax
jmp 0x4030a6
push ebx
push 0x80
push 3
push ebx
mov eax, SysReAllocString
push 1
push eax
push dword [ebp + 0xc]
lea edi, [esi + 4]
test dword [ebp + 0x14], eax
je 0x40308b
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x403091
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x4030a0
xor edi, edi
inc edi
jmp 0x40336c
mov dword [esi], 2
push 1
push ebx
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi + 0xc], eax
cmp eax, 0xffffffff
jne 0x403127
push 0x10
jmp 0x40336b
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], eax
cmp eax, ebx
je 0x4030d0
mov eax, dword [ebp + 0x10]
jmp 0x40311e
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
movzx eax, word [ebp + 0x10]
push 0xa
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x403369
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
je 0x403369
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esi + 4], eax
cmp eax, ebx
je 0x403312
push dword [ebp - 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi + 0x10], eax
mov dword [esi], 1
test byte [ebp + 0x14], 8
je 0x403154
push 0x2a
lea eax, [esi + 0x38]
push ebx
push eax
call fcn.0050c7f0
add esp, 0xc
or dword [esi], 8
push 8
pop eax
mov word [esi + 0x3e], ax
mov eax, dword [esi + 0xc]
mov dword [esi + 0x5e], eax
mov dword [esi + 0x24], ebx
jmp 0x40331d
test byte [esi], 1
jne 0x403170
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 - 0xc], edi
jmp 0x40317b
mov eax, dword [esi + 0x10]
mov dword [esi + 0x14], eax
mov dword [ebp - 0xc], eax
mov edi, eax
mov eax, 0xffff
mov dword [ebp - 4], eax
cmp edi, eax
jae 0x40318a
mov dword [ebp - 4], edi
push 0x404
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x403312
push 4
pop eax
cmp dword [ebp - 4], eax
jbe 0x403230
jmp 0x4031b5
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
add eax, 0x400
mov dword [ebp - 8], ecx
cmp eax, ecx
ja 0x4031c7
mov dword [ebp - 8], eax
mov ebx, edi
sub ebx, dword [ebp - 8]
mov eax, 0x404
sub edi, ebx
mov dword [ebp - 0x14], eax
cmp edi, eax
ja 0x4031dd
mov dword [ebp - 0x14], edi
xor edi, edi
mov eax, ebx
mov ecx, esi
call fcn.00402438
test eax, eax
jne 0x40322e
mov edi, dword [ebp - 0x14]
push dword [ebp - 0x10]
mov eax, edi
call fcn.0040247a
pop ecx
test eax, eax
je 0x40322e
add edi, 0xfffffffd
js 0x403226
mov eax, dword [ebp - 0x10]
dec edi
cmp byte [edi + eax], 0x50
jne 0x403222
cmp byte [edi + eax + 1], 0x4b
jne 0x403222
cmp byte [edi + eax + 2], 5
jne 0x403222
cmp byte [edi + eax + 3], 6
je 0x403260
test edi, edi
jge 0x403203
mov eax, dword [ebp - 4]
cmp dword [ebp - 8], eax
jb 0x4031af
xor ebx, ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor edi, edi
xor eax, eax
mov ecx, esi
call fcn.00402438
mov eax, esi
call fcn.004024d7
mov ecx, 0x8b1f
cmp ax, cx
je 0x403316
push 6
jmp 0x40336b
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
add ebx, edi
xor edi, edi
mov eax, ebx
mov ecx, esi
call fcn.00402438
mov eax, esi
call fcn.00402535
mov eax, esi
call fcn.004024d7
movzx eax, ax
mov dword [ebp - 0x14], eax
mov eax, esi
call fcn.004024d7
movzx edi, ax
mov eax, esi
call fcn.004024d7
movzx eax, ax
mov dword [esi + 0x18], eax
mov eax, esi
call fcn.004024d7
cmp dword [esi + 8], 0
movzx eax, ax
jne 0x403259
movzx eax, ax
cmp eax, dword [esi + 0x18]
jne 0x40330e
test di, di
jne 0x40330e
cmp word [ebp - 0x14], di
jne 0x40330e
mov eax, esi
call fcn.00402535
mov edi, eax
mov eax, esi
mov dword [ebp - 0x14], edi
call fcn.00402535
mov dword [esi + 0x2c], eax
mov eax, esi
call fcn.004024d7
cmp dword [esi + 8], 0
movzx eax, ax
mov dword [esi + 0x1c], eax
jne 0x403259
mov ecx, dword [esi + 0x2c]
mov eax, dword [esi + 0xc]
lea edx, [ecx + edi]
lea edi, [eax + ebx]
cmp edi, edx
jb 0x403259
sub eax, ecx
sub eax, dword [ebp - 0x14]
add eax, ebx
xor ebx, ebx
jmp 0x40332d
push 8
jmp 0x40336b
push 2
jmp 0x40336b
mov dword [esi + 0x2c], 3
mov eax, dword [esi + 0xc]
or dword [esi], 4
mov dword [esi + 8], ebx
mov dword [esi + 0x18], 1
mov dword [esi + 0x20], eax
lea eax, [esi + 0xa4]
push eax
push 0x1ff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp eax, ebx
je 0x403350
cmp byte [eax + esi + 0xa3], 0x5c
je 0x403360
add eax, esi
mov byte [eax + 0xa4], 0x5c
mov byte [eax + 0xa5], 0
mov eax, dword [ebp + 8]
mov dword [eax], esi
xor eax, eax
jmp 0x403375
push 4
pop edi
mov eax, esi
call fcn.00402f38
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret