Function at 0x4029e3
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 0x402a32
push 0xa4
push ebx
push esi
call fcn.00509740
add esp, 0xc
cmp dword [ebp + 0x18], ebx
je 0x402a44
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 0x402a3a
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 2
pop edi
jmp 0x402d98
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 0x402ae6
dec eax
je 0x402a8c
dec eax
dec eax
jne 0x402b4c
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 0x402ac5
mov eax, dword [ebp + 0xc]
mov dword [edi], eax
jmp 0x402acb
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 0x402ab0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x402ab6
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x402ac5
xor edi, edi
inc edi
jmp 0x402d91
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 0x402b4c
push 0x10
jmp 0x402d90
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], eax
cmp eax, ebx
je 0x402af5
mov eax, dword [ebp + 0x10]
jmp 0x402b43
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 0x402d8e
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
je 0x402d8e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esi + 4], eax
cmp eax, ebx
je 0x402d37
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 0x402b79
push 0x2a
lea eax, [esi + 0x38]
push ebx
push eax
call fcn.00509740
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 0x402d42
test byte [esi], 1
jne 0x402b95
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 0x402ba0
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 0x402baf
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 0x402d37
push 4
pop eax
cmp dword [ebp - 4], eax
jbe 0x402c55
jmp 0x402bda
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 0x402bec
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 0x402c02
mov dword [ebp - 0x14], edi
xor edi, edi
mov eax, ebx
mov ecx, esi
call fcn.00401e5d
test eax, eax
jne 0x402c53
mov edi, dword [ebp - 0x14]
push dword [ebp - 0x10]
mov eax, edi
call fcn.00401e9f
pop ecx
test eax, eax
je 0x402c53
add edi, 0xfffffffd
js 0x402c4b
mov eax, dword [ebp - 0x10]
dec edi
cmp byte [edi + eax], 0x50
jne 0x402c47
cmp byte [edi + eax + 1], 0x4b
jne 0x402c47
cmp byte [edi + eax + 2], 5
jne 0x402c47
cmp byte [edi + eax + 3], 6
je 0x402c85
test edi, edi
jge 0x402c28
mov eax, dword [ebp - 4]
cmp dword [ebp - 8], eax
jb 0x402bd4
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.00401e5d
mov eax, esi
call fcn.00401efc
mov ecx, 0x8b1f
cmp ax, cx
je 0x402d3b
push 6
jmp 0x402d90
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
add ebx, edi
xor edi, edi
mov eax, ebx
mov ecx, esi
call fcn.00401e5d
mov eax, esi
call fcn.00401f5a
mov eax, esi
call fcn.00401efc
movzx eax, ax
mov dword [ebp - 0x14], eax
mov eax, esi
call fcn.00401efc
movzx edi, ax
mov eax, esi
call fcn.00401efc
movzx eax, ax
mov dword [esi + 0x18], eax
mov eax, esi
call fcn.00401efc
cmp dword [esi + 8], 0
movzx eax, ax
jne 0x402c7e
movzx eax, ax
cmp eax, dword [esi + 0x18]
jne 0x402d33
test di, di
jne 0x402d33
cmp word [ebp - 0x14], di
jne 0x402d33
mov eax, esi
call fcn.00401f5a
mov edi, eax
mov eax, esi
mov dword [ebp - 0x14], edi
call fcn.00401f5a
mov dword [esi + 0x2c], eax
mov eax, esi
call fcn.00401efc
cmp dword [esi + 8], 0
movzx eax, ax
mov dword [esi + 0x1c], eax
jne 0x402c7e
mov ecx, dword [esi + 0x2c]
mov eax, dword [esi + 0xc]
lea edx, [ecx + edi]
lea edi, [eax + ebx]
cmp edi, edx
jb 0x402c7e
sub eax, ecx
sub eax, dword [ebp - 0x14]
add eax, ebx
xor ebx, ebx
jmp 0x402d52
push 8
jmp 0x402d90
push 2
jmp 0x402d90
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 0x402d75
cmp byte [eax + esi + 0xa3], 0x5c
je 0x402d85
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 0x402d9a
push 4
pop edi
mov eax, esi
call fcn.0040295d
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret