Function at 0x40c860
Capabilities:
Resolve function by parsing pe exports
Set file attributes
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x446169
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1e4
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x2c], edi
push 0x4000
mov dword [esp + 0x200], 1
call fcn.0042cfe8
xor ebp, ebp
add esp, 4
cmp eax, ebp
mov dword [esp + 0x34], eax
jne 0x40c8ae
push str.Error_SDC_1001_:_out_of_memory
jmp 0x40c928
mov eax, dword [esp + 0x204]
push 0x45d430
push eax
call fcn.0041c1b1
mov esi, eax
add esp, 8
cmp esi, ebp
mov dword [esp + 0x30], esi
jne 0x40c8f4
mov ecx, dword [esp + 0x204]
push str._for_input
push ecx
push str.Error_SDC_1002_:_unable_to_open
mov ecx, 0x464280
call fcn.004267aa
mov ecx, eax
call fcn.004267aa
mov ecx, eax
jmp 0x40c92d
mov eax, dword [esp + 0x208]
mov ecx, dword [eax - 8]
mov al, byte [ecx + eax - 1]
cmp al, 0x5c
je 0x40c917
push 0x4587d0
lea ecx, [esp + 0x20c]
call fcn.0042d683
push esi
mov ecx, edi
call fcn.0040a910
test al, al
jne 0x40c94c
push str.Error_SDC_1003_:_failed_to_load_package_header
mov ecx, 0x464280
call fcn.004267aa
push 0x403390
push 0xa
mov ecx, eax
call fcn.00426566
mov ecx, eax
call fcn.00403370
jmp 0x40cf45
mov ecx, edi
call fcn.00409f30
lea edx, [esp + 0x60]
mov dword [esp + 0x38], ebp
push edx
push esi
mov dword [esp + 0x44], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], ebp
call fcn.0041c15e
mov ecx, dword [esp + 0x20c]
add esp, 8
lea eax, [esp + 0xb4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [esp + 0xd4]
mov eax, dword [esp + 0xd0]
mov ecx, dword [0x45d440]
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x80]
mov byte [esp + 0x1fc], 2
call fcn.00409b00
lea edx, [esp + 0x80]
lea eax, [esp + 0x1c]
push edx
push eax
mov ecx, edi
mov byte [esp + 0x204], 3
call fcn.00409f90
test al, al
je 0x40ce20
lea ecx, [esp + 0x4c]
call fcn.00409a00
mov ecx, dword [esp + 0x20c]
mov bl, byte [ecx]
lea ecx, [esp + 0x4c]
call fcn.00409a30
test bl, bl
jne 0x40ce20
push 0x45d334
lea ecx, [esp + 0x20]
call fcn.0042aee8
cmp eax, 0xffffffff
jne 0x40ce04
lea edx, [esp + 0x208]
lea ecx, [esp + 0x18]
push edx
call fcn.0042d01c
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x1fc], 4
cmp byte [eax], 0x5c
jne 0x40ca4d
push 0x5c
lea ecx, [esp + 0x1c]
call fcn.0042b23c
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.0042d6bf
lea edx, [esp + 0x18]
lea ecx, [esp + 0x10]
push edx
call fcn.0042d01c
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
mov byte [esp + 0x200], 5
call fcn.0042d01c
lea ecx, [esp + 0x10]
mov byte [esp + 0x1fc], 6
call fcn.0042d232
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx - 8]
lea esi, [eax - 1]
cmp esi, ebp
jl 0x40caba
mov edx, dword [esp + 0x20]
mov al, byte [esi + edx]
mov byte [esp + 0x48], al
mov ecx, dword [esp + 0x48]
push ecx
lea ecx, [esp + 0x14]
call fcn.0042d6aa
dec esi
jns 0x40ca9e
push 0x5c
lea ecx, [esp + 0x14]
call fcn.0042d76e
cmp eax, 0xffffffff
je 0x40cb93
mov edx, dword [0x45d440]
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x50]
mov byte [esp + 0x1fc], 7
mov ecx, dword [ecx - 8]
push ecx
push eax
push edx
lea ecx, [esp + 0x1c]
call fcn.0042ad3c
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x200], 8
call fcn.0042d3e0
lea ecx, [esp + 0x50]
mov byte [esp + 0x1fc], 7
call fcn.0042d2a7
lea eax, [esp + 0x14]
lea ecx, [esp + 0x28]
push eax
call fcn.0042d01c
lea ecx, [esp + 0x14]
mov byte [esp + 0x1fc], 9
call fcn.0042d232
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx - 8]
lea esi, [eax - 1]
cmp esi, ebp
jl 0x40cb63
mov edx, dword [esp + 0x28]
mov al, byte [esi + edx]
mov byte [esp + 0x54], al
mov ecx, dword [esp + 0x54]
push ecx
lea ecx, [esp + 0x18]
call fcn.0042d6aa
dec esi
jns 0x40cb47
lea edx, [esp + 0x14]
lea ecx, [esp + 0x10]
push edx
call fcn.0042d3e0
lea ecx, [esp + 0x28]
mov byte [esp + 0x1fc], 7
call fcn.0042d2a7
lea ecx, [esp + 0x14]
mov byte [esp + 0x1fc], 6
call fcn.0042d2a7
lea eax, [esp + 0x10]
lea ecx, [esp + 0x24]
push eax
call fcn.0042d01c
push ebp
push ecx
lea edx, [esp + 0x2c]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
mov byte [esp + 0x208], 0xa
call fcn.0042d01c
mov ecx, edi
call fcn.0040cf90
test byte [esp + 0x84], 0x10
jbe 0x40cc64
mov eax, dword [0x45d440]
mov dword [esp + 0x14], eax
push str.md__
lea ecx, [esp + 0x18]
mov byte [esp + 0x200], 0xb
call fcn.0042d430
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x18]
call fcn.0042d6bf
push 0x45d34c
lea ecx, [esp + 0x18]
call fcn.0042d683
lea edx, [esp + 0x10]
lea ecx, [esp + 0x40]
push edx
call fcn.0042d01c
push ebp
push ecx
lea eax, [esp + 0x48]
mov ecx, esp
mov dword [esp + 0xb8], esp
push eax
mov byte [esp + 0x208], 0xc
call fcn.0042d01c
mov ecx, edi
call fcn.0040cf90
lea ecx, [esp + 0x40]
mov byte [esp + 0x1fc], 0xb
call fcn.0042d2a7
lea ecx, [esp + 0x14]
mov byte [esp + 0x1fc], 0xa
call fcn.0042d2a7
jmp 0x40cdbc
mov ecx, dword [esp + 0x18]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edx, dword [esp + 0x18]
push ebp
push 0x80
push 2
push ebp
push ebp
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40cedc
mov dword [esp + 0x44], 0
mov eax, dword [esp + 0xa0]
cmp ebp, eax
jae 0x40cd44
sub eax, ebp
cmp eax, 0x4000
jle 0x40ccbe
mov eax, 0x4000
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
push ecx
push eax
push 1
push ebx
call fcn.0041bd0d
mov esi, eax
add esp, 0x10
test esi, esi
jbe 0x40cd44
lea edx, [esp + 0x44]
push 0
push edx
push esi
push ebx
push edi
add ebp, esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x44], esi
jb 0x40ceac
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
add eax, esi
push 0
adc ecx, 0
push 0x64
push ecx
push eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
call fcn.0041c1d0
mov ecx, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x5c]
push ecx
push edx
push eax
call fcn.0041b9a0
mov edx, dword [esp + 0x210]
push eax
mov eax, dword [esp + 0x218]
push 0
push edx
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x40cca1
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x8c]
mov eax, dword [esp + 0x90]
mov dword [esp + 0x70], ecx
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x98]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x78], edx
lea ecx, [esp + 0x78]
mov dword [esp + 0x7c], eax
lea edx, [esp + 0x68]
push ecx
lea eax, [esp + 0x74]
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x18]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, dword [esp + 0x2c]
xor ebp, ebp
lea ecx, [esp + 0x24]
mov byte [esp + 0x1fc], 6
call fcn.0042d2a7
lea ecx, [esp + 0x20]
mov byte [esp + 0x1fc], 5
call fcn.0042d2a7
lea ecx, [esp + 0x10]
mov byte [esp + 0x1fc], 4
call fcn.0042d2a7
lea ecx, [esp + 0x18]
mov byte [esp + 0x1fc], 3
call fcn.0042d2a7
mov esi, dword [esp + 0x30]
lea eax, [esp + 0x80]
lea ecx, [esp + 0x1c]
push eax
push ecx
mov ecx, edi
call fcn.00409f90
test al, al
jne 0x40c9e6
mov eax, dword [esp + 0x34]
push eax
call fcn.0042d011
push esi
call fcn.0041c0e1
add esp, 8
lea ecx, [esp + 0x2c]
call fcn.00409a00
mov ecx, dword [esp + 0x20c]
mov bl, byte [ecx]
lea ecx, [esp + 0x2c]
call fcn.00409a30
test bl, bl
jne 0x40cf20
lea ecx, [esp + 0x80]
mov byte [esp + 0x1fc], 2
call fcn.00405620
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1fc], 1
call fcn.0042d2a7
lea ecx, [esp + 0x204]
mov byte [esp + 0x1fc], bl
call fcn.0042d2a7
lea ecx, [esp + 0x208]
mov dword [esp + 0x1fc], 0xffffffff
call fcn.0042d2a7
mov al, 1
jmp 0x40cf72
mov edx, dword [esp + 0x18]
mov ecx, 0x464280
push edx
push str.Error_SDC_1005_:_short_write_on
call fcn.004267aa
mov ecx, eax
call fcn.004267aa
push 0x403390
push 0xa
mov ecx, eax
call fcn.00426566
mov ecx, eax
call fcn.00403370
lea ecx, [esp + 0x24]
mov byte [esp + 0x1fc], 6
call fcn.0042d2a7
lea ecx, [esp + 0x20]
mov byte [esp + 0x1fc], 5
call fcn.0042d2a7
lea ecx, [esp + 0x10]
mov byte [esp + 0x1fc], 4
call fcn.0042d2a7
lea ecx, [esp + 0x18]
mov byte [esp + 0x1fc], 3
call fcn.0042d2a7
lea ecx, [esp + 0x80]
mov byte [esp + 0x1fc], 2
call fcn.00405620
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1fc], 1
call fcn.0042d2a7
lea ecx, [esp + 0x204]
mov byte [esp + 0x1fc], 0
call fcn.0042d2a7
lea ecx, [esp + 0x208]
mov dword [esp + 0x1fc], 0xffffffff
call fcn.0042d2a7
xor al, al
mov ecx, dword [esp + 0x1f4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1f0
ret 0x14