Function at 0x401050
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x6550
call fcn.004018c0
mov eax, dword [0x41d0a4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 1
jle 0x4010e5
mov eax, 4
shl eax, 0
mov ecx, 1
imul edx, ecx, 0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + eax]
movsx ecx, byte [eax + edx]
cmp ecx, 0x2d
jne 0x4010e5
mov edx, 4
shl edx, 0
mov eax, 1
shl eax, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + edx]
movsx eax, byte [edx + eax]
cmp eax, 0x2d
jne 0x4010e5
mov ecx, 4
shl ecx, 0
mov edx, 1
shl edx, 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + ecx]
movsx edx, byte [ecx + edx]
cmp edx, 0x73
jne 0x4010e5
mov eax, 4
shl eax, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
call fcn.00405810
add esp, 4
cmp eax, 0xb
je 0x4010ec
xor eax, eax
jmp 0x40156f
mov dword [ebp - 0x6544], 0x24
mov dword [ebp - 0x6510], 0
push 0x41d024
push str.data
mov eax, dword [ebp - 0x6510]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x6524], eax
cmp dword [ebp - 0x6524], 0
jne 0x401148
push str.Could_not_find_resource_n
push 2
call fcn.004030af
add esp, 4
push eax
call fcn.00401630
add esp, 8
mov eax, 1
jmp 0x40156f
mov ecx, dword [ebp - 0x6524]
push ecx
mov edx, dword [ebp - 0x6510]
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x6534], eax
cmp dword [ebp - 0x6534], 0
jne 0x40118d
push str.Could_not_load_resource_n
push 2
call fcn.004030af
add esp, 4
push eax
call fcn.00401630
add esp, 8
mov eax, 1
jmp 0x40156f
mov eax, dword [ebp - 0x6524]
push eax
mov ecx, dword [ebp - 0x6510]
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x653c], eax
mov edx, dword [ebp - 0x6534]
mov dword [ebp - 0x6540], edx
mov eax, dword [ebp - 0x653c]
push eax
call fcn.004053d6
add esp, 4
push 0x1400
push 0
lea ecx, [ebp - 0x2908]
push ecx
call fcn.004022c0
add esp, 0xc
push 0x1400
push 0
lea edx, [ebp - 0x1508]
push edx
call fcn.004022c0
add esp, 0xc
push 0x1400
push 0
lea eax, [ebp - 0x5108]
push eax
call fcn.004022c0
add esp, 0xc
mov dword [ebp - 0x651c], 1
jmp 0x40121f
mov ecx, dword [ebp - 0x651c]
add ecx, 1
mov dword [ebp - 0x651c], ecx
mov edx, dword [ebp - 0x651c]
cmp edx, dword [ebp + 8]
jge 0x40126a
mov eax, dword [ebp - 0x651c]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax*4]
push edx
lea eax, [ebp - 0x1508]
push eax
call fcn.00405720
add esp, 8
mov ecx, dword [ebp + 8]
sub ecx, 1
cmp dword [ebp - 0x651c], ecx
jge 0x401268
push 0x41d070
lea edx, [ebp - 0x1508]
push edx
call fcn.00405720
add esp, 8
jmp 0x401210
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x6510], eax
cmp dword [ebp - 0x6510], 0
je 0x4012b0
push 0x1400
lea ecx, [ebp - 0x6508]
push ecx
mov edx, dword [ebp - 0x6510]
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
jmp 0x4012ba
mov eax, 0x3e7
jmp 0x40156f
push str.TEMP
call fcn.004055fa
add esp, 4
mov dword [ebp - 0x6528], eax
cmp dword [ebp - 0x6528], 0
je 0x4012e9
mov eax, dword [ebp - 0x6528]
push eax
call fcn.00405810
add esp, 4
test eax, eax
jne 0x4012f3
mov eax, 0x3e7
jmp 0x40156f
mov dword [ebp - 0x6514], 0
jmp 0x40130e
mov ecx, dword [ebp - 0x6514]
add ecx, 1
mov dword [ebp - 0x6514], ecx
cmp dword [ebp - 0x6514], 0x60
jge 0x40134c
mov edx, dword [ebp - 0x6540]
add edx, dword [ebp - 0x6514]
movzx ecx, byte [edx]
mov eax, dword [ebp - 0x6514]
xor edx, edx
div dword [ebp - 0x6544]
movzx edx, byte [edx + str.f7926585_1872_4abd_adba_37572d7db113CUSTOMDATA]
xor ecx, edx
mov eax, dword [ebp - 0x6514]
mov byte [ebp + eax - 0x2908], cl
jmp 0x4012ff
mov ecx, 1
imul edx, ecx, 0x60
mov dword [ebp - 0x6538], edx
cmp dword [ebp - 0x6538], 0x1400
jae 0x401368
jmp 0x40136d
call fcn.004017c6
mov eax, dword [ebp - 0x6538]
mov byte [ebp + eax - 0x2908], 0
call fcn.004053b5
push eax
call fcn.004053b5
push eax
call fcn.004053b5
push eax
mov ecx, dword [ebp - 0x6528]
push ecx
push str._s_d_d_d
lea edx, [ebp - 0x3d08]
push edx
call fcn.00401670
add esp, 0x18
mov dword [ebp - 0x6520], 0
push 0x41d088
lea eax, [ebp - 0x3d08]
push eax
call fcn.004032e5
add esp, 8
mov dword [ebp - 0x6520], eax
mov ecx, dword [ebp - 0x653c]
mov dword [ebp - 0x652c], ecx
mov edx, dword [ebp - 0x652c]
push edx
call fcn.004053aa
add esp, 4
mov dword [ebp - 0x6548], eax
mov dword [ebp - 0x6550], 4
mov dword [ebp - 0x6518], 0
jmp 0x401412
mov eax, dword [ebp - 0x6518]
add eax, 1
mov dword [ebp - 0x6518], eax
mov ecx, dword [ebp - 0x652c]
sub ecx, 0x60
cmp dword [ebp - 0x6518], ecx
jae 0x40145a
mov edx, dword [ebp - 0x6540]
add edx, dword [ebp - 0x6518]
movzx ecx, byte [edx + 0x60]
mov eax, dword [ebp - 0x6518]
xor edx, edx
div dword [ebp - 0x6544]
movzx edx, byte [edx + str.f7926585_1872_4abd_adba_37572d7db113CUSTOMDATA]
xor ecx, edx
mov eax, dword [ebp - 0x6548]
add eax, dword [ebp - 0x6518]
mov byte [eax], cl
jmp 0x401403
mov ecx, dword [ebp - 0x6520]
push ecx
push 1
mov edx, dword [ebp - 0x652c]
sub edx, 0x60
push edx
mov eax, dword [ebp - 0x6548]
push eax
call fcn.0040351b
add esp, 0x10
push 0
call fcn.00401000
add esp, 4
push eax
call fcn.004053d6
add esp, 4
mov dword [ebp - 0x6530], 0
jmp 0x4014aa
mov ecx, dword [ebp - 0x6530]
add ecx, 1
mov dword [ebp - 0x6530], ecx
cmp dword [ebp - 0x6530], 0xa
jge 0x4014e3
call fcn.004053b5
mov edx, 1
imul ecx, edx, 0
mov byte [ebp + ecx - 0x6509], al
mov edx, dword [ebp - 0x6520]
push edx
push 1
push 1
lea eax, [ebp - 0x6509]
push eax
call fcn.0040351b
add esp, 0x10
jmp 0x40149b
mov ecx, dword [ebp - 0x6520]
push ecx
call fcn.004031aa
add esp, 4
lea edx, [ebp - 0x1508]
push edx
lea eax, [ebp - 0x3d08]
push eax
lea ecx, [ebp - 0x2908]
push ecx
lea edx, [ebp - 0x5108]
push edx
call fcn.00401670
add esp, 0x10
mov dword [ebp - 0x654c], 0x4d
lea eax, [ebp - 0x5108]
push eax
call fcn.00405703
add esp, 4
mov dword [ebp - 0x654c], eax
push 0x7530
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.__persist
lea ecx, [ebp - 0x1508]
push ecx
call fcn.00402420
add esp, 8
test eax, eax
je 0x40155a
jmp 0x401569
lea edx, [ebp - 0x3d08]
push edx
call fcn.00403787
add esp, 4
mov eax, dword [ebp - 0x654c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004018a2
mov esp, ebp
pop ebp
ret