Function at 0x580aa0
Capabilities:
Delete file
Extract resource via kernel32 functions
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x589a9c
mov eax, dword fs:[0]
push eax
sub esp, 0x1a0
mov eax, dword [0x5ed130]
xor eax, ebp
mov dword [ebp - 0x40], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x16c], esp
mov eax, dword [ebp + 8]
push eax
call fcn.00401580
mov dword [ebp - 0x198], eax
call fcn.00567250
add esp, 0x1c
mov byte [ebp - 0x199], al
movzx ecx, byte [ebp - 0x199]
test ecx, ecx
je 0x580b20
movzx edx, byte [ebp + 0x14]
test edx, edx
je 0x580b14
mov eax, dword [ebp + 8]
push eax
call fcn.0057db10
add esp, 4
jmp 0x580b1b
xor al, al
jmp 0x580eae
jmp 0x580c46
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x170], esp
mov edx, dword [ebp + 8]
push edx
call fcn.00401580
mov dword [ebp - 0x1a0], eax
call fcn.0057e3a0
add esp, 0x1c
mov byte [ebp - 0x1a1], al
movzx eax, byte [ebp - 0x1a1]
test eax, eax
je 0x580c46
movzx ecx, byte [ebp + 0x14]
test ecx, ecx
je 0x580b7a
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x580c46
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x580c1b
cmp dword [ebp - 0x28], 0xffffffff
je 0x580c1b
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp + 0xc]
push edx
movzx eax, word [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], 0
push 0
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
movzx eax, byte [ebp + 0x18]
test eax, eax
je 0x580c3f
push 0
push 0x80
push 3
push 0
push 1
push accept
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov al, 1
jmp 0x580eae
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x580c75
cmp dword [ebp - 0x18], 0
jne 0x580e12
movzx eax, byte [ebp + 0x14]
test eax, eax
je 0x580de7
mov byte [ebp - 0x14c], 0
push 0x103
push 0
lea ecx, [ebp - 0x14b]
push ecx
call fcn.0043fa10
add esp, 0xc
lea edx, [ebp - 0x14c]
push edx
call fcn.0057dac0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push str._x.tmp
lea eax, [ebp - 0x14c]
push eax
call fcn.0043f980
add esp, 4
lea ecx, [ebp + eax - 0x14c]
push ecx
call fcn.0043fe06
add esp, 0xc
lea edx, [ebp - 0x14c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0
movzx eax, word [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x14c]
push edx
call fcn.00580aa0
add esp, 0x14
movzx eax, al
test eax, eax
je 0x580de7
push 0x5dee84
call fcn.00580000
add esp, 4
push eax
lea ecx, [ebp - 0x14c]
push ecx
lea edx, [ebp - 0x168]
push edx
call fcn.00584760
add esp, 0xc
mov dword [ebp - 4], 0
lea eax, [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push str.modm5ds.dll
call fcn.00580000
add esp, 4
push eax
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x190]
push edx
call fcn.00584760
add esp, 0xc
mov dword [ebp - 0x1a8], eax
mov eax, dword [ebp - 0x1a8]
mov dword [ebp - 0x1ac], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x168]
push ecx
mov edx, dword [ebp - 0x1ac]
push edx
call fcn.0040a8a0
add esp, 8
mov byte [ebp - 0x171], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x190]
call fcn.00401600
movzx eax, byte [ebp - 0x171]
test eax, eax
je 0x580dd5
mov byte [ebp - 0x191], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x168]
call fcn.00401600
mov al, byte [ebp - 0x191]
jmp 0x580eae
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x168]
call fcn.00401600
movzx ecx, byte [ebp + 0x18]
test ecx, ecx
je 0x580e0b
push 0
push 0x80
push 3
push 0
push 1
push accept
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
xor al, al
jmp 0x580eae
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0xc]
push eax
movzx ecx, word [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], 0
push 0
lea ecx, [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
movzx ecx, byte [ebp + 0x18]
test ecx, ecx
je 0x580eac
push 0
push 0x80
push 3
push 0
push 1
push accept
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x40]
xor ecx, ebp
call fcn.0043dd0c
mov esp, ebp
pop ebp
ret