Function at 0x590d0480
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5914dac2
push eax
mov dword fs:[0], esp
sub esp, 0x474
push ebx
push ebp
push esi
mov esi, dword [esp + 0x490]
xor ebp, ebp
push edi
cmp esi, ebp
je 0x590d06e6
push esi
call fcn.5908146d
add esp, 4
test eax, eax
je 0x590d06e6
mov ebx, dword [esp + 0x4a0]
cmp ebx, ebp
je 0x590d06e6
push ebx
call fcn.5908146d
add esp, 4
test eax, eax
je 0x590d06e6
mov eax, dword [0x5915584c]
mov dword [esp + 0x18], eax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x76]
mov word [esp + 0x74], bp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x27e]
mov word [esp + 0x27c], bp
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x27c]
lea edx, [esp + 0x74]
push ecx
push edx
push ebp
push ebp
push ebx
mov dword [esp + 0x4a0], ebp
stosw word es:[edi], ax
call fcn.59126317
add esp, 0x14
lea eax, [esp + 0x74]
lea ecx, [esp + 0x20]
push eax
call fcn.590996a0
lea ecx, [esp + 0x27c]
mov byte [esp + 0x48c], 1
push ecx
lea ecx, [esp + 0x14]
call fcn.590996a0
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0x20]
push str.INIW__s_s
push ecx
mov byte [esp + 0x49c], 2
call fcn.5909cc60
add esp, 0x10
lea ecx, [esp + 0x18]
call fcn.5909b000
call fcn.590b2990
test eax, eax
je 0x590d05d7
call fcn.590b2f90
cmp eax, 0x50000
jb 0x590d05d7
lea edx, [esp + 0x18]
lea eax, [esp + 0x1c]
push edx
push str.Global_
push eax
call fcn.5909a720
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x490], 3
call fcn.59099f80
lea ecx, [esp + 0x1c]
mov byte [esp + 0x48c], 2
call fcn.59099e00
lea ecx, [esp + 0x10]
mov byte [esp + 0x48c], 1
call fcn.59099e00
lea ecx, [esp + 0x20]
mov byte [esp + 0x48c], 0
call fcn.59099e00
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x51], edx
lea eax, [esp + 0x50]
mov dword [esp + 0x55], edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x59], edx
push 1
mov dword [esp + 0x61], edx
push eax
mov word [esp + 0x69], dx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x44], ecx
mov byte [esp + 0x58], cl
mov byte [esp + 0x6b], dl
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push ebp
push ebp
lea ecx, [esp + 0x58]
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
lea edx, [esp + 0x54]
push ecx
push ebp
lea ecx, [esp + 0x50]
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x48], ebp
mov dword [esp + 0x44], edx
call fcn.590abeb0
lea edx, [esp + 0x44]
push 1
push edx
lea ecx, [esp + 0x70]
mov byte [esp + 0x494], 4
call fcn.590ac020
push ebp
push ebx
mov byte [esp + 0x494], 5
call fcn.590d2e80
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x590d0701
push ebx
lea ecx, [esp + 0x20]
call fcn.590996a0
lea ecx, [esp + 0x1c]
call fcn.59099e00
lea ecx, [esp + 0x68]
mov byte [esp + 0x48c], 4
call fcn.590ac080
lea ecx, [esp + 0x44]
mov byte [esp + 0x48c], 0
call fcn.590abf00
lea ecx, [esp + 0x18]
mov dword [esp + 0x48c], 0xffffffff
call fcn.59099e00
xor eax, eax
mov ecx, dword [esp + 0x484]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x480
ret
push esi
call fcn.5908146d
add esp, 4
lea edi, [esi + eax*2]
mov ax, word [esi]
cmp ax, 0x20
je 0x590d0732
push eax
call fcn.5908276c
add esp, 4
test eax, eax
jne 0x590d073b
mov ax, word [esi]
cmp ax, 0xd
je 0x590d073b
cmp ax, 0xa
je 0x590d073b
cmp esi, edi
jae 0x590d073b
add esi, 2
jmp 0x590d070d
mov ax, word [edi - 2]
cmp ax, 0x20
je 0x590d0762
push eax
call fcn.5908276c
add esp, 4
test eax, eax
jne 0x590d076b
mov ax, word [edi - 2]
cmp ax, 0xd
je 0x590d076b
cmp ax, 0xa
je 0x590d076b
cmp esi, edi
jae 0x590d076b
add edi, 0xfffffffe
jmp 0x590d073b
sub edi, esi
sar edi, 1
lea eax, [edi + edi + 2]
push eax
call fcn.591315b0
mov ebx, eax
lea ecx, [edi + edi]
add esp, 4
cmp edi, ebp
mov dword [esp + 0x30], ebx
mov word [ecx + ebx], bp
jle 0x590d079d
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebp, dword [esp + 0x498]
xor esi, esi
cmp ebp, esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x2c], esi
je 0x590d0be3
push ebp
call fcn.5908146d
add esp, 4
test eax, eax
je 0x590d0be3
push ebp
mov esi, ebp
call fcn.5908146d
add esp, 4
lea edi, [ebp + eax*2]
mov ax, word [esi]
cmp ax, 0x20
je 0x590d07ff
push eax
call fcn.5908276c
add esp, 4
test eax, eax
jne 0x590d0808
mov ax, word [esi]
cmp ax, 0xd
je 0x590d0808
cmp ax, 0xa
je 0x590d0808
cmp esi, edi
jae 0x590d0808
add esi, 2
jmp 0x590d07da
mov ax, word [edi - 2]
cmp ax, 0x20
je 0x590d082f
push eax
call fcn.5908276c
add esp, 4
test eax, eax
jne 0x590d0838
mov ax, word [edi - 2]
cmp ax, 0xd
je 0x590d0838
cmp ax, 0xa
je 0x590d0838
cmp esi, edi
jae 0x590d0838
add edi, 0xfffffffe
jmp 0x590d0808
sub edi, esi
sar edi, 1
lea eax, [edi + edi + 2]
push eax
call fcn.591315b0
lea ecx, [edi + edi]
add esp, 4
test edi, edi
mov dword [esp + 0x64], eax
mov word [ecx + eax], 0
jle 0x590d086a
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x49c]
test esi, esi
je 0x590d0b8b
push esi
call fcn.5908146d
add esp, 4
test eax, eax
je 0x590d0b8b
push esi
call fcn.5908146d
add esp, 4
lea edi, [esi + eax*2]
mov ax, word [esi]
cmp ax, 0x20
je 0x590d08bb
push eax
call fcn.5908276c
add esp, 4
test eax, eax
jne 0x590d08c4
mov ax, word [esi]
cmp ax, 0xd
je 0x590d08c4
cmp ax, 0xa
je 0x590d08c4
cmp esi, edi
jae 0x590d08c4
add esi, 2
jmp 0x590d0896
mov ax, word [edi - 2]
cmp ax, 0x20
je 0x590d08eb
push eax
call fcn.5908276c
add esp, 4
test eax, eax
jne 0x590d08f4
mov ax, word [edi - 2]
cmp ax, 0xd
je 0x590d08f4
cmp ax, 0xa
je 0x590d08f4
cmp esi, edi
jae 0x590d08f4
add edi, 0xfffffffe
jmp 0x590d08c4
sub edi, esi
sar edi, 1
lea eax, [edi + edi + 2]
push eax
call fcn.591315b0
lea ecx, [edi + edi]
add esp, 4
test edi, edi
mov dword [esp + 0x4c], eax
mov word [ecx + eax], 0
jle 0x590d0926
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x498]
push eax
call fcn.5908146d
mov ecx, dword [esp + 0x4a0]
mov esi, eax
push ecx
call fcn.5908146d
mov edi, eax
lea ebx, [edi + esi]
lea edx, [ebx + ebx + 8]
push edx
call fcn.591315b0
mov ebp, eax
push 0x5917a61c
push ebp
mov word [ebp + ebx*2 + 6], 0
call fcn.590802a8
mov ebx, dword [esp + 0x4ac]
lea eax, [ebp + 4]
push ebx
push eax
call fcn.590802a8
add esi, 2
push 0x5918d9d4
lea ecx, [ebp + esi*2]
push ecx
call fcn.590802a8
mov edx, dword [esp + 0x4c0]
inc esi
push edx
lea eax, [ebp + esi*2]
push eax
call fcn.590802a8
push 0x10
add esi, edi
call fcn.591315b0
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x5c]
push edx
mov dword [esp + 0x74], eax
mov dword [eax], ecx
mov dword [eax + 4], ebx
mov dword [eax + 8], ebp
mov dword [eax + 0xc], esi
push eax
lea eax, [esp + 0x5c]
push 0x590d0ec0
push eax
mov eax, dword [esp + 0x70]
lea edx, [esp + 0x68]
push edx
push eax
push ecx
call fcn.590d2350
add esp, 0x4c
cmp eax, 1
jne 0x590d0a0b
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x590d0a04
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
lea ecx, [esi + esi]
add eax, edx
push ecx
mov ecx, dword [esp + 0x18]
push ebp
push eax
push ecx
call fcn.590d2b60
add esp, 0x10
mov esi, eax
jmp 0x590d0b6c
test eax, eax
jne 0x590d0b6a
mov edx, dword [esp + 0x30]
push edx
call fcn.5908146d
mov ebx, dword [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 4
mov dword [esp + 0x20], eax
push 1
push 0
push 0
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x1c], 0xffffffff
je 0x590d0a48
mov dword [esp + 0x1c], eax
push 2
push 0
push 0
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x10], 0xffffffff
je 0x590d0a62
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
push 0
push 0
push eax
push ebx
call edi
cmp dword [esp + 0x10], 2
jle 0x590d0aa4
mov ecx, dword [esp + 0x20]
lea edi, [ecx + esi + 4]
lea edx, [edi + edi + 2]
push edx
call fcn.591315b0
mov ebx, eax
push 0x5918d9cc
push ebx
mov word [ebx + edi*2], 0
call fcn.590802a8
add esp, 0xc
mov edi, 3
jmp 0x590d0ad1
mov eax, dword [esp + 0x20]
lea edi, [eax + esi + 2]
lea ecx, [edi + edi + 2]
push ecx
call fcn.591315b0
mov ebx, eax
push 0x5918d9c8
push ebx
mov word [ebx + edi*2], 0
call fcn.590802a8
add esp, 0xc
mov edi, 1
mov edx, dword [esp + 0x30]
lea eax, [ebx + edi*2]
push edx
push eax
call fcn.590802a8
mov ecx, dword [esp + 0x28]
push 0x5918d9c4
add edi, ecx
lea ecx, [ebx + edi*2]
push ecx
call fcn.590802a8
inc edi
push ebp
lea edx, [ebx + edi*2]
push edx
call fcn.590802a8
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
add esp, 0x18
add edi, esi
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add edi, edi
test edi, edi
jne 0x590d0b2d
push ebx
mov esi, 1
call fcn.591315d9
add esp, 4
jmp 0x590d0b6c
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x10]
push 0
push edx
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x590d0b52
push ebx
xor esi, esi
call fcn.591315d9
add esp, 4
jmp 0x590d0b6c
mov eax, dword [esp + 0x10]
xor ecx, ecx
cmp eax, edi
push ebx
sete cl
mov esi, ecx
call fcn.591315d9
add esp, 4
jmp 0x590d0b6c
xor esi, esi
mov edx, dword [esp + 0x4c]
push edx
call fcn.591315d9
push ebp
call fcn.591315d9
mov eax, dword [esp + 0x48]
push eax
call fcn.591315d9
add esp, 0xc
jmp 0x590d0bcc
push 8
call fcn.591315b0
lea ecx, [esp + 0x30]
mov edi, eax
mov eax, dword [esp + 0x18]
push ecx
push edi
lea edx, [esp + 0x30]
push 0x590d0ca0
lea ecx, [esp + 0x38]
push edx
push ecx
push ebx
push eax
mov dword [edi], eax
mov dword [edi + 4], ebp
call fcn.590d2350
xor edx, edx
cmp eax, 0xffffffff
setne dl
push edi
mov esi, edx
call fcn.591315d9
add esp, 0x24
mov eax, dword [esp + 0x64]
push eax
call fcn.591315d9
mov ebx, dword [esp + 0x34]
mov edi, dword [esp + 0x18]
add esp, 4
jmp 0x590d0c44
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x2c]
push ecx
push esi
lea edx, [esp + 0x2c]
push esi
lea eax, [esp + 0x34]
push edx
push eax
push ebx
push edi
call fcn.590d2350
add esp, 0x1c
cmp eax, 1
jne 0x590d0c3b
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
cmp eax, 4
jge 0x590d0c27
lea edx, [ecx + eax + 4]
push edx
push eax
push edi
call fcn.590d2d40
add esp, 0xc
mov esi, eax
jmp 0x590d0c44
add ecx, eax
add eax, 0xfffffffc
push ecx
push eax
push edi
call fcn.590d2d40
add esp, 0xc
mov esi, eax
jmp 0x590d0c44
xor edx, edx
cmp eax, esi
sete dl
mov esi, edx
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.591315d9
add esp, 4
lea ecx, [esp + 0x68]
mov byte [esp + 0x48c], 4
call fcn.590ac080
lea ecx, [esp + 0x44]
mov byte [esp + 0x48c], 0
call fcn.590abf00
lea ecx, [esp + 0x18]
mov dword [esp + 0x48c], 0xffffffff
call fcn.59099e00
mov eax, esi
jmp 0x590d06e8