Function at 0x423b30
Capabilities:
Extract resource via kernel32 functions
Get common file path
Read file on windows

Disassembly:
sub esp, 0x54
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push ebp
push esi
push edi
push 0x218
push 0
mov ebp, edx
mov dword [esp + 0x5c], ecx
mov byte [esp + 0x1f], 0
mov dword [esp + 0x4c], ebx
call ebx
mov esi, eax
test esi, esi
je 0x423b91
push 0x114
push 0
push esi
call sub.VCRUNTIME140.dll_memset
mov edi, dword [esp + 0x80]
add esp, 0xc
test edi, edi
je 0x423ba8
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push 0
call ebx
mov dword [esi + 0x48], eax
test eax, eax
jne 0x423ba0
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, 0x54
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, dword [esp + 0x70]
mov eax, ecx
and eax, 0x3ffffff7
mov dword [esi + 0x30], 0xffffffff
mov dword [esi + 0x34], 0xffffffff
mov dword [esp + 0x48], ecx
sub eax, 1
je 0x423c7a
sub eax, 1
je 0x423bff
sub eax, 2
jne 0x423ce6
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ebx, [esi + 4]
push 2
push eax
push eax
push ebx
call edi
push eax
push ebp
call edi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x423c44
mov dword [ebx], ebp
jmp 0x423c4a
lea ebx, [esi + 4]
push 0
push 0x80
push 3
push 0
push 3
push closesocket
push ebp
test ecx, ecx
jns 0x423c21
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x423c27
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x423c44
mov ecx, esi
mov edi, 1
call fcn.00423ab0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov dword [esi], 2
push 1
push 0
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi + 0xc], eax
cmp eax, 0xffffffff
jne 0x423ce6
mov ecx, esi
mov edi, 0x10
call fcn.00423ab0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov dword [esi + 4], ebp
test ebp, ebp
je 0x423c8b
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
jmp 0x423cda
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
movzx ecx, word [esp + 0x68]
mov edi, eax
push 0xa
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x4244c9
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4244c9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esi + 4], eax
test eax, eax
je 0x4244b3
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
xor ecx, ecx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
mov dword [esi], 1
test byte [esp + 0x48], 8
je 0x423d35
push 0x2a
lea eax, [esi + 0x50]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, 8
mov dword [esi + 0x8e], 0
lea ebp, [esi + 0xc]
mov word [esi + 0x56], ax
mov eax, dword [ebp]
add esp, 0xc
or dword [esi], 8
mov dword [esi + 0x76], eax
mov dword [esi + 0x8a], eax
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
jmp 0x424457
test byte [esi], 1
mov eax, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov dword [esp + 0x20], eax
jne 0x423d70
push 2
lea ecx, [esp + 0x4c]
xorps xmm0, xmm0
push ecx
movlpd qword [esp + 0x50], xmm0
push dword [esp + 0x54]
push dword [esp + 0x54]
push dword [esi + 4]
call eax
mov eax, dword [esp + 0x48]
sub eax, dword [esi + 0xc]
mov ecx, dword [esp + 0x4c]
sbb ecx, 0
jmp 0x423d7c
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
xor ebp, ebp
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x38], eax
mov ebx, 0xffff
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x48], ebp
test ecx, ecx
jg 0x423da9
jl 0x423d9d
cmp eax, ebx
jae 0x423da9
mov ebx, eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x2c], ebx
mov ebp, ecx
push 0x404
push 0
call dword [esp + 0x4c]
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
je 0x4244b3
xor ecx, ecx
mov eax, 4
cmp ecx, ebp
jg 0x4243b6
jl 0x423de0
cmp eax, ebx
jae 0x4243b6
nop dword [eax + eax]
add eax, 0x400
mov dword [esp + 0x28], eax
adc ecx, 0
mov dword [esp + 0x44], ecx
cmp ecx, ebp
jl 0x423e06
jg 0x423dfa
cmp eax, ebx
jbe 0x423e06
mov eax, ebx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x28], eax
mov ecx, ebp
mov ebx, dword [esp + 0x38]
mov ebp, ebx
mov edx, dword [esp + 0x3c]
sub ebp, eax
sbb edx, ecx
mov dword [esp + 0x1c], edx
test ecx, ecx
jb 0x423e2c
ja 0x423e25
cmp eax, 0x404
jbe 0x423e2c
mov ebx, 0x404
jmp 0x423e2e
sub ebx, ebp
test byte [esi], 1
jne 0x423e6e
mov ecx, dword [esi + 0xc]
lea edi, [esp + 0x58]
xor eax, eax
add ecx, ebp
push 0
adc eax, edx
mov dword [esp + 0x5c], ecx
push edi
push eax
lea edx, [esi + 4]
mov dword [esp + 0x68], eax
push ecx
push dword [edx]
mov dword [esp + 0x44], edx
call dword [esp + 0x34]
mov edi, dword [esp + 0x18]
test eax, eax
je 0x4243b6
lea ecx, [esi + 0x18]
lea eax, [esi + 4]
jmp 0x423e7d
lea ecx, [esi + 0x18]
lea eax, [esi + 4]
mov dword [ecx], ebp
mov dword [ecx + 4], edx
mov dword [esp + 0x30], eax
test byte [esi], 1
mov edi, ebx
mov dword [esp + 0x34], ecx
jne 0x423eb5
push 0
lea ecx, [esp + 0x44]
push ecx
push ebx
push dword [esp + 0x24]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x423eaf
xor edi, edi
mov dword [esi + 8], 7
mov dword [esp + 0x40], edi
jmp 0x423ef2
mov edi, dword [esp + 0x40]
jmp 0x423ef2
mov edx, dword [ecx]
xor eax, eax
mov dword [esp + 0x24], ebx
add dword [esp + 0x24], edx
adc eax, dword [ecx + 4]
cmp eax, dword [esi + 0x14]
jb 0x423ed8
mov eax, dword [esi + 0x10]
ja 0x423ed4
cmp dword [esp + 0x24], eax
jbe 0x423ed8
mov edi, eax
sub edi, edx
mov eax, dword [esi + 4]
push edi
add eax, edx
push eax
push dword [esp + 0x20]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add dword [esi + 0x18], edi
adc dword [esi + 0x1c], 0
test edi, edi
mov edi, dword [esp + 0x18]
je 0x4243b6
lea ecx, [ebx - 3]
test ecx, ecx
js 0x423f31
lea eax, [edi + 3]
add eax, ecx
nop word [eax + eax]
mov edx, ecx
lea eax, [eax - 1]
dec ecx
cmp byte [eax - 3], 0x50
jne 0x423f2d
cmp byte [edx + edi], 0x4b
jne 0x423f2d
cmp byte [eax - 1], 5
jne 0x423f2d
cmp byte [eax], 6
je 0x423f54
test ecx, ecx
jns 0x423f10
mov ecx, dword [esp + 0x44]
mov ebp, dword [esp + 0x48]
cmp ecx, ebp
jg 0x4243b6
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
jge 0x423dd3
jmp 0x423de0
cmp byte [ecx + edi - 0x14], 0x50
lea eax, [ecx + edi]
jne 0x423f7d
cmp byte [eax - 0x13], 0x4b
jne 0x423f7d
cmp byte [eax - 0x12], 6
jne 0x423f7d
cmp byte [eax - 0x11], 7
jne 0x423f7d
mov ebp, dword [eax - 0xc]
mov ebx, dword [eax - 8]
mov byte [esp + 0x17], 1
jmp 0x423f88
mov ebx, dword [esp + 0x1c]
mov eax, ecx
cdq
add ebp, eax
adc ebx, edx
push edi
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test byte [esi], 1
jne 0x423fbb
mov ecx, dword [esi + 0xc]
lea edx, [esp + 0x58]
xor eax, eax
add ecx, ebp
push 0
push edx
adc eax, ebx
mov dword [esp + 0x60], ecx
push eax
push ecx
push dword [esi + 4]
mov dword [esp + 0x70], eax
call dword [esp + 0x34]
jmp 0x423fc1
mov dword [esi + 0x18], ebp
mov dword [esi + 0x1c], ebx
mov eax, dword [esi + 8]
mov dword [esp + 0x48], 0
test eax, eax
jne 0x423fe3
push 4
lea edx, [esp + 0x4c]
mov ecx, esi
call fcn.004222d0
mov eax, dword [esi + 8]
add esp, 4
cmp byte [esp + 0x17], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x58], xmm0
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x40], ecx
je 0x4240e2
mov ecx, esi
call fcn.00422350
mov ecx, dword [esi + 8]
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x48], 0
test ecx, ecx
jne 0x424038
push 4
lea edx, [esp + 0x4c]
mov ecx, esi
call fcn.004222d0
mov ecx, dword [esi + 8]
add esp, 4
xor ebx, ebx
mov dword [esp + 0x48], ebx
test ecx, ecx
jne 0x42407f
push 4
lea edx, [esp + 0x4c]
mov ecx, esi
call fcn.004222d0
add esp, 4
test eax, eax
je 0x42407b
movzx ebx, byte [esp + 0x4b]
movzx eax, byte [esp + 0x4a]
mov ecx, dword [esp + 0x48]
shl ebx, 8
or ebx, eax
movzx eax, ch
shl ebx, 8
or ebx, eax
movzx eax, cl
shl ebx, 8
or ebx, eax
jmp 0x42407f
mov ebx, dword [esp + 0x48]
xor edi, edi
mov dword [esp + 0x48], edi
cmp dword [esi + 8], edi
jne 0x4240c7
push 4
lea edx, [esp + 0x4c]
mov ecx, esi
call fcn.004222d0
add esp, 4
test eax, eax
je 0x4240c3
movzx edi, byte [esp + 0x4b]
movzx eax, byte [esp + 0x4a]
mov ecx, dword [esp + 0x48]
shl edi, 8
or edi, eax
movzx eax, ch
shl edi, 8
or edi, eax
movzx eax, cl
shl edi, 8
or edi, eax
jmp 0x4240c7
mov edi, dword [esp + 0x48]
mov ecx, esi
call fcn.00422350
mov dword [esi + 0x20], eax
mov ecx, esi
mov dword [esi + 0x24], edx
call fcn.00422350
mov ecx, eax
jmp 0x4241d4
test eax, eax
jne 0x424110
push 2
lea edx, [esp + 0x4c]
mov ecx, esi
call fcn.004222d0
add esp, 4
test eax, eax
je 0x424110
mov eax, dword [esp + 0x48]
movzx ecx, ah
movzx eax, al
shl cx, 8
or cx, ax
movzx eax, cx
jmp 0x424114
mov eax, dword [esp + 0x48]
cmp dword [esi + 8], 0
movzx ebx, ax
jne 0x424147
push 2
lea edx, [esp + 0x4c]
mov ecx, esi
call fcn.004222d0
add esp, 4
test eax, eax
je 0x424147
mov eax, dword [esp + 0x48]
movzx ecx, ah
movzx eax, al
shl cx, 8
or cx, ax
movzx eax, cx
jmp 0x42414b
mov eax, dword [esp + 0x48]
cmp dword [esi + 8], 0
movzx edi, ax
jne 0x42417e
push 2
lea edx, [esp + 0x4c]
mov ecx, esi
call fcn.004222d0
add esp, 4
test eax, eax
je 0x42417e
mov eax, dword [esp + 0x48]
movzx ecx, ah
movzx eax, al
shl cx, 8
or cx, ax
movzx eax, cx
jmp 0x424182
mov eax, dword [esp + 0x48]
movzx eax, ax
cdq
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edx
cmp dword [esi + 8], 0
jne 0x4241bc
push 2
lea edx, [esp + 0x4c]
mov ecx, esi
call fcn.004222d0
add esp, 4
test eax, eax
je 0x4241bc
mov eax, dword [esp + 0x48]
movzx ecx, ah
movzx eax, al
shl cx, 8
or cx, ax
movzx eax, cx
jmp 0x4241c0
mov eax, dword [esp + 0x48]
movzx eax, ax
cdq
mov ecx, eax
lea eax, [esi + 0x18]
mov dword [esp + 0x34], eax
lea eax, [esi + 4]
mov dword [esp + 0x30], eax
cmp dword [esi + 8], 0
jne 0x424433
cmp ecx, dword [esi + 0x20]
jne 0x4243a0
cmp edx, dword [esi + 0x24]
jne 0x4243a0
test edi, edi
jne 0x4243a0
test ebx, ebx
jne 0x4243a0
mov ecx, esi
cmp byte [esp + 0x17], bl
je 0x424289
call fcn.00422350
mov ebx, edx
mov ecx, esi
mov edi, eax
mov dword [esp + 0x2c], ebx
call fcn.00422350
mov ecx, eax
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], edx
mov eax, dword [esi + 0xc]
add ecx, eax
mov dword [esp + 0x48], 0
adc edx, 0
add ecx, dword [esp + 0x44]
adc edx, dword [esp + 0x40]
add ecx, edi
adc edx, ebx
add ecx, 0x34
adc edx, 0
test byte [esi], 1
jne 0x424277
add eax, ecx
mov ecx, dword [esp + 0x48]
push 0
adc ecx, edx
mov dword [esp + 0x5c], eax
lea edx, [esp + 0x5c]
mov dword [esp + 0x60], ecx
push edx
push ecx
push eax
mov eax, dword [esp + 0x40]
push dword [eax]
call dword [esp + 0x34]
jmp 0x424326
mov eax, dword [esp + 0x34]
mov dword [esp + 0x2c], ebx
mov dword [eax], ecx
mov dword [eax + 4], edx
jmp 0x424326
push 4
lea edx, [esp + 0x1c]
mov dword [esp + 0x1c], 0
call fcn.004222d0
add esp, 4
test eax, eax
je 0x4242c8
movzx edi, byte [esp + 0x1b]
movzx eax, byte [esp + 0x1a]
mov ecx, dword [esp + 0x18]
shl edi, 8
or edi, eax
movzx eax, ch
shl edi, 8
or edi, eax
movzx eax, cl
shl edi, 8
or edi, eax
jmp 0x4242cc
mov edi, dword [esp + 0x18]
xor edx, edx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x18], edx
cmp dword [esi + 8], edx
jne 0x42431c
push 4
lea edx, [esp + 0x1c]
mov ecx, esi
call fcn.004222d0
add esp, 4
test eax, eax
je 0x424318
movzx edx, byte [esp + 0x1b]
movzx eax, byte [esp + 0x1a]
mov ecx, dword [esp + 0x18]
shl edx, 8
or edx, eax
movzx eax, ch
shl edx, 8
or edx, eax
movzx eax, cl
shl edx, 8
or edx, eax
jmp 0x42431c
mov edx, dword [esp + 0x18]
mov dword [esi + 0x40], edx
mov dword [esi + 0x44], 0
cmp dword [esi + 8], 0
jne 0x424356
push 2
lea edx, [esp + 0x4c]
mov ecx, esi
call fcn.004222d0
add esp, 4
test eax, eax
je 0x424356
mov eax, dword [esp + 0x48]
movzx ecx, ah
movzx eax, al
shl cx, 8
or cx, ax
movzx eax, cx
jmp 0x42435a
mov eax, dword [esp + 0x48]
cmp dword [esi + 8], 0
movzx eax, ax
mov dword [esi + 0x28], eax
jne 0x424433
mov ebx, dword [esi + 0xc]
xor eax, eax
mov edx, dword [esi + 0x40]
add ebx, ebp
mov ecx, dword [esi + 0x44]
adc eax, dword [esp + 0x1c]
add edx, edi
adc ecx, dword [esp + 0x2c]
cmp eax, ecx
jb 0x424433
ja 0x424393
cmp ebx, edx
jb 0x424433
sub ebp, dword [esi + 0x40]
sub ebp, edi
add ebp, dword [esi + 0xc]
jmp 0x424472
mov ecx, esi
mov edi, 8
call fcn.00423ab0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test byte [esi], 1
lea ebp, [esi + 0xc]
jne 0x4243e7
mov eax, dword [ebp]
lea ecx, [esp + 0x58]
push 0
push ecx
push 0
push eax
push dword [esi + 4]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], 0
call dword [esp + 0x34]
jmp 0x4243f5
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
cmp dword [esi + 8], 0
jne 0x424425
push 2
lea edx, [esp + 0x4c]
mov ecx, esi
call fcn.004222d0
add esp, 4
test eax, eax
je 0x424425
mov eax, dword [esp + 0x48]
movzx ecx, ah
movzx eax, al
shl cx, 8
or cx, ax
movzx eax, cx
jmp 0x424429
mov eax, dword [esp + 0x48]
mov ecx, 0x8b1f
cmp ax, cx
je 0x424449
mov ecx, esi
mov edi, 6
call fcn.00423ab0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov dword [esi + 0x40], 3
mov dword [esi + 0x44], 0
or dword [esi], 4
mov ebp, dword [ebp]
mov dword [esi + 8], 0
mov dword [esi + 0x20], 1
mov dword [esi + 0x24], 0
lea eax, [esi + 0x110]
mov dword [esi + 0x2c], ebp
push eax
push 0x103
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x424497
cmp byte [eax + esi + 0x10f], 0x5c
je 0x4244a3
jmp 0x424499
xor eax, eax
mov word [eax + esi + 0x110], 0x5c
mov eax, dword [esp + 0x54]
mov dword [eax], esi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov ecx, esi
mov edi, 2
call fcn.00423ab0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov edi, 4
mov ecx, esi
call fcn.00423ab0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret