Function at 0x404530
Capabilities:
Create directory
Delete file
Extract resource via kernel32 functions
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52c90b
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x588fc8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0x12c
lea eax, [ebp - 0x23c]
push eax
push str.APPDATA
mov dword [ebp - 0x248], esi
call ebx
lea ecx, [ebp - 0x23c]
push ecx
lea ecx, [ebp - 0x240]
call fcn.00403e40
push 0xb
push str._btSearcher
lea ecx, [ebp - 0x240]
mov dword [ebp - 4], 0
call fcn.00402fc0
mov edx, dword [ebp - 0x240]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call fcn.0041ea2f
mov esi, dword [eax + 0xc]
push 0x53cdec
push 0x9d
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x404618
push eax
push eax
push str.cannot_find_resource_
call fcn.004135fd
mov eax, dword [ebp - 0x240]
or ebx, 0xffffffff
add eax, 0xfffffff0
mov dword [ebp - 4], ebx
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jg 0x404611
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x404750
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push esi
mov dword [ebp - 0x244], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push 0x100
lea ecx, [ebp - 0x110]
push ecx
push str.APPDATA
mov dword [ebp - 0x24c], eax
call ebx
lea eax, [ebp - 0x110]
or ebx, 0xffffffff
add eax, ebx
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404652
mov edx, dword [str._btSearcher]
mov ecx, dword [0x53c84c]
mov dword [eax], edx
mov edx, dword [0x53c850]
lea edi, [ebp - 0x110]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
add edi, ebx
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404680
mov ax, word [0x53cdd0]
mov word [edi], ax
mov eax, dword [ebp - 0x248]
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4046a0
lea edi, [ebp - 0x110]
sub eax, ecx
mov esi, ecx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4046b3
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x110]
push 0x53cdcc
push ecx
call fcn.00510a2a
mov esi, eax
add esp, 8
test esi, esi
jne 0x40470d
mov eax, dword [ebp - 0x240]
add eax, 0xfffffff0
mov dword [ebp - 4], ebx
lea edx, [eax + 0xc]
lock xadd dword [edx], ebx
dec ebx
test ebx, ebx
jg 0x404611
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x404750
mov ecx, dword [ebp - 0x244]
mov edx, dword [ebp - 0x24c]
push esi
push ecx
push 1
push edx
call fcn.005108f4
push esi
call fcn.00510729
mov eax, dword [ebp - 0x240]
add eax, 0xfffffff0
add esp, 0x14
mov dword [ebp - 4], ebx
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jg 0x40474e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050e65d
mov esp, ebp
pop ebp
ret