Function at 0x51d38c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x51d8b7
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 0
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov eax, esi
call fcn.00405878
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x51d8a1
xor eax, eax
push ebp
push 0x51d89a
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov al, bl
cmp eax, 0x80
jg 0x51d44e
je 0x51d687
cmp eax, 0x40
jg 0x51d42e
je 0x51d593
sub eax, 1
jb 0x51d49f
sub eax, 0xf
je 0x51d4dc
sub eax, 0x10
je 0x51d519
sub eax, 0x10
je 0x51d556
jmp 0x51d864
sub eax, 0x50
je 0x51d5d0
sub eax, 0x10
je 0x51d60d
sub eax, 0x10
je 0x51d64a
jmp 0x51d864
cmp eax, 0xc0
jg 0x51d47d
je 0x51d77b
sub eax, 0x90
je 0x51d6c4
sub eax, 0x10
je 0x51d701
sub eax, 0x10
je 0x51d73e
jmp 0x51d864
sub eax, 0xd0
je 0x51d7b8
sub eax, 0x10
je 0x51d7f2
sub eax, 0x10
je 0x51d82c
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051ce38
push eax
xor eax, eax
call fcn.0051ce38
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d4ce
mov al, 2
call fcn.0051ce38
cmp eax, dword [ebp - 0xc]
je 0x51d4d2
xor eax, eax
jmp 0x51d4d4
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051ceb4
push eax
xor eax, eax
call fcn.0051ceb4
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d50b
mov al, 2
call fcn.0051ceb4
cmp eax, dword [ebp - 0xc]
je 0x51d50f
xor eax, eax
jmp 0x51d511
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051cf30
push eax
xor eax, eax
call fcn.0051cf30
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d548
mov al, 2
call fcn.0051cf30
cmp eax, dword [ebp - 0xc]
je 0x51d54c
xor eax, eax
jmp 0x51d54e
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051cfac
push eax
xor eax, eax
call fcn.0051cfac
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d585
mov al, 2
call fcn.0051cfac
cmp eax, dword [ebp - 0xc]
je 0x51d589
xor eax, eax
jmp 0x51d58b
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051d028
push eax
xor eax, eax
call fcn.0051d028
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d5c2
mov al, 2
call fcn.0051d028
cmp eax, dword [ebp - 0xc]
je 0x51d5c6
xor eax, eax
jmp 0x51d5c8
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051d0a4
push eax
xor eax, eax
call fcn.0051d0a4
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d5ff
mov al, 2
call fcn.0051d0a4
cmp eax, dword [ebp - 0xc]
je 0x51d603
xor eax, eax
jmp 0x51d605
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051d120
push eax
xor eax, eax
call fcn.0051d120
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d63c
mov al, 2
call fcn.0051d120
cmp eax, dword [ebp - 0xc]
je 0x51d640
xor eax, eax
jmp 0x51d642
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051d19c
push eax
xor eax, eax
call fcn.0051d19c
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d679
mov al, 2
call fcn.0051d19c
cmp eax, dword [ebp - 0xc]
je 0x51d67d
xor eax, eax
jmp 0x51d67f
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051d218
push eax
xor eax, eax
call fcn.0051d218
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d6b6
mov al, 2
call fcn.0051d218
cmp eax, dword [ebp - 0xc]
je 0x51d6ba
xor eax, eax
jmp 0x51d6bc
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051d294
push eax
xor eax, eax
call fcn.0051d294
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d6f3
mov al, 2
call fcn.0051d294
cmp eax, dword [ebp - 0xc]
je 0x51d6f7
xor eax, eax
jmp 0x51d6f9
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051cdbc
push eax
xor eax, eax
call fcn.0051cdbc
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d730
mov al, 2
call fcn.0051cdbc
cmp eax, dword [ebp - 0xc]
je 0x51d734
xor eax, eax
jmp 0x51d736
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051cd40
push eax
xor eax, eax
call fcn.0051cd40
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d76d
mov al, 2
call fcn.0051cd40
cmp eax, dword [ebp - 0xc]
je 0x51d771
xor eax, eax
jmp 0x51d773
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051ccc4
push eax
xor eax, eax
call fcn.0051ccc4
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d7aa
mov al, 2
call fcn.0051ccc4
cmp eax, dword [ebp - 0xc]
je 0x51d7ae
xor eax, eax
jmp 0x51d7b0
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051d310
push eax
xor eax, eax
call fcn.0051d310
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d7e7
mov al, 2
call fcn.0051d310
cmp eax, dword [ebp - 0xc]
je 0x51d7eb
xor eax, eax
jmp 0x51d7ed
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051cc48
push eax
xor eax, eax
call fcn.0051cc48
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d821
mov al, 2
call fcn.0051cc48
cmp eax, dword [ebp - 0xc]
je 0x51d825
xor eax, eax
jmp 0x51d827
mov al, 1
mov byte [ebp - 1], al
jmp 0x51d864
push 0
lea eax, [ebp - 0xc]
push eax
mov al, 2
call fcn.0051cbcc
push eax
xor eax, eax
call fcn.0051cbcc
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x51d85b
mov al, 2
call fcn.0051cbcc
cmp eax, dword [ebp - 0xc]
je 0x51d85f
xor eax, eax
jmp 0x51d861
mov al, 1
mov byte [ebp - 1], al
cmp byte [ebp - 1], 0
jne 0x51d883
mov eax, esi
call fcn.00405878
mov edx, eax
lea eax, [ebp - 0x10]
call fcn.00405594
mov eax, dword [ebp - 0x10]
call fcn.0040d0dc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d8a1
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_CloseHandle_1
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d8be
lea eax, [ebp - 0x10]
call fcn.0040539c
ret