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

Disassembly:
sub esp, 0x28
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push esi
push edi
push 0x218
push 0
mov edi, eax
mov ebx, ecx
mov byte [esp + 0x1b], 0
call ebp
mov esi, eax
test esi, esi
je 0x420794
push 0x114
push 0
push esi
call sub.MSVCR100.dll_memset
add esp, 0xc
test edi, edi
je 0x4207ab
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push 0
call ebp
mov dword [esi + 0x48], eax
test eax, eax
jne 0x4207a3
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edi, 2
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, dword [esp + 0x44]
mov eax, ecx
or ebp, 0xffffffff
and eax, 0x3ffffff7
dec eax
mov dword [esi + 0x30], ebp
mov dword [esi + 0x34], ebp
je 0x42086e
dec eax
je 0x4207f5
sub eax, 2
jne 0x4208d8
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 2
push eax
push eax
lea edi, [esi + 4]
push edi
call ebp
push eax
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x420839
mov dword [edi], ebx
jmp 0x42083f
push 0
push 0x80
push 3
push 0
push 3
push connect
lea edi, [esi + 4]
push ebx
test ecx, ecx
jns 0x420817
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x42081d
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi], eax
cmp eax, ebp
jne 0x420839
mov eax, esi
mov edi, 1
call fcn.00420680
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov dword [esi], 2
mov eax, dword [edi]
push 1
xor ebx, ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi + 0xc], eax
cmp eax, 0xffffffff
jne 0x4208da
mov eax, esi
lea edi, [ebx + 0x10]
call fcn.00420680
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
xor ebp, ebp
mov dword [esi + 4], ebx
cmp ebx, ebp
je 0x420880
mov ecx, dword [esp + 0x40]
mov dword [esi + 0x10], ecx
jmp 0x4208cf
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
movzx edx, word [esp + 0x40]
push 0xa
mov edi, eax
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
cmp ebx, ebp
je 0x420dae
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebp
je 0x420dae
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esi + 4], eax
cmp eax, ebp
je 0x420cff
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ebp
mov dword [esi], 1
xor ebx, ebx
test byte [esp + 0x44], 8
je 0x420918
push 0x2a
lea eax, [esi + 0x50]
push ebx
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [esi + 0xc]
mov ecx, 8
add esp, 0xc
or dword [esi], ecx
mov word [esi + 0x56], cx
mov dword [esi + 0x76], eax
mov dword [esi + 0x8a], eax
mov dword [esi + 0x8e], ebx
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
jmp 0x420d54
test byte [esi], 1
jne 0x42094d
push 2
lea edx, [esp + 0x24]
push edx
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov dword [esp + 0x30], eax
mov eax, dword [esi + 4]
push eax
mov dword [esp + 0x38], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
xor edi, edi
sub ecx, dword [esi + 0xc]
sbb eax, edi
jmp 0x42095e
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x1c], ecx
mov dword [esi + 0x18], eax
mov ecx, eax
mov eax, dword [esi + 0x1c]
xor edi, edi
mov ebp, 0xffff
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], edi
cmp eax, ebx
jg 0x42098b
jl 0x42097f
cmp ecx, ebp
jae 0x42098b
mov ebp, ecx
mov edi, eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], edi
push 0x404
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x420cff
xor eax, eax
mov ecx, 4
test edi, edi
jl 0x420a4a
jg 0x4209c0
cmp ebp, ecx
jbe 0x420a4a
lea ebx, [ebx]
add ecx, 0x400
adc eax, 0
cmp eax, edi
jl 0x4209dd
jg 0x4209d3
cmp ecx, ebp
jbe 0x4209dd
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], edi
jmp 0x4209e5
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov ebp, edx
sub ebp, dword [esp + 0x18]
mov edi, eax
sbb edi, dword [esp + 0x1c]
mov ecx, edx
sub ecx, ebp
sbb eax, edi
test eax, eax
jb 0x420a17
ja 0x420a0d
cmp ecx, 0x404
jbe 0x420a17
mov dword [esp + 0x14], 0x404
jmp 0x420a1d
sub edx, ebp
mov dword [esp + 0x14], edx
test byte [esi], 1
jne 0x420a7e
mov eax, dword [esi + 0xc]
push 0
xor ecx, ecx
add eax, ebp
lea edx, [esp + 0x34]
push edx
adc ecx, edi
push ecx
push eax
mov dword [esp + 0x40], eax
mov eax, dword [esi + 4]
push eax
mov dword [esp + 0x48], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x420a84
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test byte [esi], 1
jne 0x420d15
mov eax, dword [esi + 0xc]
xor ecx, ecx
push ecx
lea edx, [esp + 0x34]
push edx
push ecx
push eax
mov dword [esp + 0x40], eax
mov eax, dword [esi + 4]
push eax
mov dword [esp + 0x48], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x420d1d
mov dword [esi + 0x18], ebp
mov dword [esi + 0x1c], edi
mov eax, dword [esp + 0x14]
mov edx, ebx
call fcn.0041ef20
test eax, eax
je 0x420a4a
mov eax, dword [esp + 0x14]
add eax, 0xfffffffd
js 0x420ac0
lea esp, [esp]
dec eax
cmp byte [eax + ebx], 0x50
jne 0x420abc
cmp byte [eax + ebx + 1], 0x4b
jne 0x420abc
cmp byte [eax + ebx + 2], 5
jne 0x420abc
cmp byte [eax + ebx + 3], 6
je 0x420aef
test eax, eax
jns 0x420aa0
mov ecx, dword [esp + 0x24]
cmp dword [esp + 0x1c], ecx
jg 0x420a4a
jl 0x420ada
mov edx, dword [esp + 0x20]
cmp dword [esp + 0x18], edx
jae 0x420a4a
mov ebp, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
jmp 0x4209c0
cmp byte [eax + ebx - 0x14], 0x50
jne 0x420b1a
cmp byte [eax + ebx - 0x13], 0x4b
jne 0x420b1a
cmp byte [eax + ebx - 0x12], 6
jne 0x420b1a
cmp byte [eax + ebx - 0x11], 7
jne 0x420b1a
mov ebp, dword [eax + ebx - 0xc]
mov edi, dword [eax + ebx - 8]
mov byte [esp + 0x13], 1
jmp 0x420b1f
cdq
add ebp, eax
adc edi, edx
push ebx
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test byte [esi], 1
jne 0x420b55
mov eax, dword [esi + 0xc]
push 0
xor ecx, ecx
add eax, ebp
lea edx, [esp + 0x34]
push edx
adc ecx, edi
push ecx
push eax
mov dword [esp + 0x40], eax
mov eax, dword [esi + 4]
push eax
mov dword [esp + 0x48], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x420b5b
mov dword [esi + 0x18], ebp
mov dword [esi + 0x1c], edi
mov eax, esi
call fcn.0041f000
xor eax, eax
cmp byte [esp + 0x13], al
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov eax, esi
je 0x420bb2
call fcn.0041f0e0
mov dword [esp + 0x28], eax
mov eax, esi
mov dword [esp + 0x2c], edx
call fcn.0041f000
mov eax, esi
call fcn.0041f000
mov dword [esp + 0x14], eax
mov eax, esi
call fcn.0041f000
mov ebx, eax
mov eax, esi
call fcn.0041f0e0
mov dword [esi + 0x20], eax
mov eax, esi
mov dword [esi + 0x24], edx
call fcn.0041f0e0
jmp 0x420be4
call fcn.0041ef90
movzx ecx, ax
mov eax, esi
mov dword [esp + 0x14], ecx
call fcn.0041ef90
movzx ebx, ax
mov eax, esi
call fcn.0041ef90
movzx eax, ax
cdq
mov dword [esi + 0x20], eax
mov eax, esi
mov dword [esi + 0x24], edx
call fcn.0041ef90
movzx eax, ax
cdq
cmp dword [esi + 8], 0
jne 0x420d2e
cmp eax, dword [esi + 0x20]
jne 0x420ce9
cmp edx, dword [esi + 0x24]
jne 0x420ce9
test ebx, ebx
jne 0x420ce9
cmp dword [esp + 0x14], ebx
jne 0x420ce9
mov eax, esi
cmp byte [esp + 0x13], bl
je 0x420c7e
call fcn.0041f0e0
mov ebx, eax
mov eax, esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], edx
call fcn.0041f0e0
xor edi, edi
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], edx
mov edx, dword [esi + 0xc]
mov eax, edx
add eax, ebx
mov ecx, edi
adc ecx, dword [esp + 0x24]
add eax, dword [esp + 0x28]
adc ecx, dword [esp + 0x2c]
add eax, dword [esi + 0x40]
adc ecx, dword [esi + 0x44]
add eax, 0x34
adc ecx, edi
test byte [esi], 1
jne 0x420c98
add edx, eax
push 0
adc edi, ecx
mov ecx, dword [esi + 4]
lea eax, [esp + 0x34]
push eax
push edi
push edx
push ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x420c9e
call fcn.0041f000
mov dword [esp + 0x20], eax
mov eax, esi
xor ebx, ebx
call fcn.0041f000
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], ebx
jmp 0x420ca6
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x24]
mov eax, esi
call fcn.0041ef90
cmp dword [esi + 8], 0
movzx edx, ax
mov dword [esi + 0x28], edx
jne 0x420d2e
mov eax, dword [esi + 0xc]
xor ecx, ecx
mov edx, eax
add edx, ebp
adc ecx, edi
mov edi, dword [esp + 0x20]
add edi, dword [esi + 0x40]
adc ebx, dword [esi + 0x44]
cmp ecx, ebx
jb 0x420d2e
ja 0x420cd8
cmp edx, edi
jb 0x420d2e
sub eax, dword [esp + 0x20]
sub eax, dword [esi + 0x40]
add eax, ebp
mov dword [esi + 0x2c], eax
jmp 0x420d6a
mov eax, esi
mov edi, 8
call fcn.00420680
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov eax, esi
mov edi, 2
call fcn.00420680
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
xor eax, eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov eax, esi
call fcn.0041ef90
mov ecx, 0x8b1f
cmp ax, cx
je 0x420d44
mov eax, esi
mov edi, 6
call fcn.00420680
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov dword [esi + 0x40], 3
mov dword [esi + 0x44], 0
xor ebx, ebx
mov edx, dword [esi + 0xc]
or dword [esi], 4
mov dword [esi + 0x2c], edx
mov dword [esi + 8], ebx
mov dword [esi + 0x20], 1
mov dword [esi + 0x24], ebx
lea eax, [esi + 0x110]
push eax
push 0x103
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xor ecx, ecx
mov edx, eax
or edx, ecx
mov cl, 0x5c
je 0x420d8f
cmp byte [eax + esi + 0x10f], cl
je 0x420d9e
mov byte [eax + esi + 0x110], cl
mov byte [eax + esi + 0x111], 0
mov eax, dword [esp + 0x3c]
mov dword [eax], esi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov eax, esi
mov edi, 4
call fcn.00420680
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret