Function at 0x438140
Capabilities:
Extract resource via kernel32 functions
Print debug messages
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d0ae8
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x649fe8]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
cmp word [edi], ax
jne 0x438195
xor ecx, ecx
jmp 0x4381af
mov ecx, edi
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4381a0
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x2c]
call fcn.00409e30
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x50]
mov ebx, dword [0x65b078]
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
mov esi, dword [0x65ae70]
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x4381f6
cmp dword [ebp - 0x30], esi
jb 0x4381f6
lea ecx, [ebp - 0x2c]
call fcn.0043ae00
cmp eax, ebx
jne 0x4381f6
mov bl, 1
jmp 0x4381f8
xor bl, bl
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x43820d
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00409f30
test bl, bl
jne 0x43832a
lea eax, [ebp - 0x54]
push eax
push fcn.00438140
push 4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
push 2
push 0x620044
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x43834e
push esi
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push dword [ebp - 0x54]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x5c], eax
test eax, eax
je 0x43834e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x43834e
mov edx, ebx
lea ecx, [ebp - 0x58]
call fcn.00438fa0
push ebx
mov byte [ebp - 4], 1
push esi
push dword [ebp - 0x58]
call fcn.0058cf70
mov ebx, dword [ebp - 0x58]
add esp, 0xc
add ebx, 0x8bfe
xor esi, esi
test dword [0x65ae70], 0xfffffffc
jbe 0x4382d4
mov eax, 0x2040811
mov ecx, esi
mul esi
mov eax, esi
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 6
imul eax, eax, 0x7f
sub ecx, eax
mov eax, dword [ecx*4 + 0x65ae74]
sub dword [ebx + esi*4], eax
inc esi
mov eax, dword [0x65ae70]
shr eax, 2
cmp esi, eax
jl 0x4382a4
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov ecx, dword [ebx + 0x3c]
mov edx, 2
mov eax, dword [0x65b078]
mov dword [ecx + ebx + 0x58], eax
mov ecx, edi
push dword [0x65ae70]
push ebx
call fcn.0043af70
mov ebx, dword [ebp + 0xc]
add esp, 8
test bl, bl
jns 0x438318
push 0x620050
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, edi
call fcn.0043b310
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x43832d
push eax
call fcn.0043b800
add esp, 4
jmp 0x43832d
mov ebx, dword [ebp + 0xc]
and ebx, 0x20
or ebx, 0x800
shr ebx, 4
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, 1
jmp 0x438350
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00571951
mov esp, ebp
pop ebp
ret