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

Disassembly:
push ebp
lea ebp, [esp - 0x108]
sub esp, 0x108
push 0xffffffffffffffff
push 0x488a80
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x4b2288]
xor eax, ebp
mov dword [ebp + 0x104], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov eax, dword [esi + 0x394]
cmp eax, 3
lea ecx, [eax + 1]
mov dword [ebp - 0x1c], esi
mov dword [esi + 0x394], ecx
jge 0x411532
lea edi, [esi + 0x24c]
mov eax, edi
mov dword [ebp - 4], 0
lea edx, [eax + 1]
jmp 0x411270
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x411270
sub eax, edx
jne 0x4112d2
push 0x104
lea edx, [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x411292
mov ecx, dword [0x490ba4]
mov edx, dword [0x490ba8]
mov dword [eax], ecx
mov ecx, dword [0x490bac]
mov dword [eax + 4], edx
mov dl, byte [0x490bb0]
mov dword [eax + 8], ecx
mov byte [eax + 0xc], dl
lea ecx, [ebp]
mov edx, edi
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x4112c4
lea eax, [ebp - 0x44]
push eax
add esi, 0x24c
push 0
push esi
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
test eax, eax
je 0x4112f2
cmp dword [ebp - 0x24], 0
jg 0x41135c
push 0x490220
push 0xa6
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ecx, dword [ebp - 0x14]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push ecx
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x411359
push 0
lea edx, [ebp - 0x18]
push edx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x14]
push 0
push 1
push esi
call fcn.00410510
add esp, 0xc
push 0
push 0x3e8
call fcn.00405c50
add esp, 8
lea eax, [ebp - 0x44]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
test eax, eax
je 0x411393
cmp dword [ebp - 0x24], 0
jg 0x411532
push 0x104
lea ecx, [ebp]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
call fcn.0045c3bd
cdq
mov ecx, 0x32
lea edi, [ebp]
idiv ecx
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x4113b5
mov ax, word [0x490010]
push 0xffffffffffffffff
push 0xa
push edx
lea ecx, [ebp - 0x3c]
push ecx
mov word [edi], ax
call fcn.0040bd40
mov ebx, 0x10
add esp, 0x10
cmp dword [eax + 0x18], ebx
jb 0x4113e8
mov eax, dword [eax + 4]
jmp 0x4113eb
add eax, 4
mov edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4113f0
lea edi, [ebp]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x411401
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
cmp dword [ebp - 0x24], ebx
rep movsb byte es:[edi], byte [esi]
jb 0x41142c
mov edx, dword [ebp - 0x38]
push edx
call fcn.00418702
add esp, 4
sub esp, 0x1c
mov ecx, esp
lea eax, [ebp]
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], 0
mov dword [ebp - 0x18], esp
mov byte [ecx + 4], 0
lea esi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x411450
sub eax, esi
push eax
lea eax, [ebp]
push eax
call fcn.00404640
call fcn.004100a0
lea eax, [ebp]
add esp, 0x1c
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x411473
mov ecx, dword [0x490ba4]
mov edx, dword [0x490ba8]
mov dword [eax], ecx
mov ecx, dword [0x490bac]
mov dword [eax + 4], edx
mov dl, byte [0x490bb0]
mov dword [eax + 8], ecx
mov byte [eax + 0xc], dl
mov edx, dword [ebp - 0x14]
lea ecx, [ebp]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x4114a6
push 0x490220
push 0xa6
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, dword [ebp - 0x1c]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
add edi, 0x24c
push edi
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x411525
mov ecx, dword [ebp - 0x14]
push 0
lea eax, [ebp - 0x20]
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 1
push edi
call fcn.00410510
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x104]
xor ecx, ebp
call fcn.00459426
add ebp, 0x108
mov esp, ebp
pop ebp
ret