Function at 0x10051bd0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x84
mov edx, dword [esp + 0xa0]
mov ebp, dword [esp + 0xac]
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
test edx, edx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
je 0x10051c46
mov ebx, dword [esp + 0x9c]
xor eax, eax
movzx ecx, word [ebx + eax*2]
add eax, 1
add word [esp + ecx*2 + 0x44], 1
cmp eax, edx
jne 0x10051c35
mov eax, dword [esp + 0xa8]
movzx esi, word [esp + 0x62]
mov eax, dword [eax]
test si, si
mov dword [esp + 8], eax
jne 0x100522d9
cmp word [esp + 0x60], 0
jne 0x10052294
cmp word [esp + 0x5e], 0
jne 0x100522ed
cmp word [esp + 0x5c], 0
jne 0x100522e3
cmp word [esp + 0x5a], 0
jne 0x10052316
cmp word [esp + 0x58], 0
jne 0x1005230c
cmp word [esp + 0x56], 0
jne 0x1005233d
cmp word [esp + 0x54], 0
jne 0x10052330
cmp word [esp + 0x52], 0
jne 0x1005234a
cmp word [esp + 0x50], 0
jne 0x10052357
cmp word [esp + 0x4e], 0
jne 0x10052371
cmp word [esp + 0x4c], 0
jne 0x10052364
cmp word [esp + 0x4a], 0
jne 0x1005238b
cmp word [esp + 0x48], 0
jne 0x1005237e
cmp word [esp + 0x46], 0
jne 0x10051d48
mov edx, dword [esp + 0xa4]
mov ebx, dword [esp + 0xa8]
mov eax, dword [edx]
mov byte [eax], 0x40
mov byte [eax + 1], 1
mov word [eax + 2], 0
mov byte [eax + 4], 0x40
mov byte [eax + 5], 1
mov word [eax + 6], 0
add eax, 8
mov dword [edx], eax
xor eax, eax
mov dword [ebx], 1
add esp, 0x84
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x28], 1
mov edi, 1
movzx ecx, word [esp + 0x46]
mov ebx, 2
mov eax, 0xffffffff
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x48]
add ebx, ebx
mov eax, 0xffffffff
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x4a]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x4c]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x4e]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x50]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x52]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x54]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x56]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x58]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x5a]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x5c]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x5e]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
movzx ecx, word [esp + 0x60]
add ebx, ebx
sub ebx, ecx
js 0x10051d3d
add ebx, ebx
movzx ecx, si
sub ebx, ecx
cmp ebx, 0
jl 0x10051d3d
je 0x10051e40
cmp dword [esp + 0x28], 1
jne 0x10052398
mov eax, dword [esp + 0x98]
test eax, eax
je 0x10052398
movzx eax, word [esp + 0x46]
mov word [esp + 0x66], 0
mov word [esp + 0x68], ax
add ax, word [esp + 0x48]
mov word [esp + 0x6a], ax
add ax, word [esp + 0x4a]
mov word [esp + 0x6c], ax
add ax, word [esp + 0x4c]
mov word [esp + 0x6e], ax
add ax, word [esp + 0x4e]
mov word [esp + 0x70], ax
add ax, word [esp + 0x50]
mov word [esp + 0x72], ax
add ax, word [esp + 0x52]
mov word [esp + 0x74], ax
add ax, word [esp + 0x54]
mov word [esp + 0x76], ax
add ax, word [esp + 0x56]
mov word [esp + 0x78], ax
add ax, word [esp + 0x58]
mov word [esp + 0x7a], ax
add ax, word [esp + 0x5a]
mov word [esp + 0x7c], ax
add ax, word [esp + 0x5c]
mov word [esp + 0x7e], ax
add ax, word [esp + 0x5e]
mov word [esp + 0x80], ax
add ax, word [esp + 0x60]
test edx, edx
mov word [esp + 0x82], ax
je 0x10051f1c
mov dword [esp + 0xc], edi
mov edi, dword [esp + 0x9c]
xor eax, eax
lea esi, [esi]
movzx ecx, word [edi + eax*2]
test cx, cx
je 0x10051f11
movzx ecx, cx
movzx ebx, word [esp + ecx*2 + 0x64]
movzx esi, bx
add ebx, 1
mov word [ebp + esi*2], ax
mov word [esp + ecx*2 + 0x64], bx
add eax, 1
cmp eax, edx
jne 0x10051ef0
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x98]
test esi, esi
jne 0x100521da
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x2c], 0x13
mov eax, dword [esp + 8]
cmp dword [esp + 0x28], eax
cmovbe eax, dword [esp + 0x28]
mov dword [esp + 0x20], 1
mov edx, dword [esp + 0xa4]
cmp edi, eax
cmovae eax, edi
mov ecx, eax
mov edx, dword [edx]
shl dword [esp + 0x20], cl
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], edx
sub ebx, 1
cmp dword [esp + 0x98], 1
mov dword [esp + 0x34], ebx
sete byte [esp + 0x42]
cmp dword [esp + 0x20], 0x353
ja 0x10052229
cmp dword [esp + 0x98], 2
sete byte [esp + 0x43]
cmp dword [esp + 0x20], 0x24f
ja 0x1005223e
mov eax, dword [esp + 0x24]
xor edx, edx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x30], 0xffffffff
mov dword [esp + 0x10], 0
mov ebx, edi
xor esi, esi
sub bl, byte [esp + 0x10]
mov byte [esp + 8], bl
movzx ebx, word [ebp]
movzx ecx, bx
cmp dword [esp + 0x2c], ecx
jg 0x10051ffd
mov ebx, 0
mov esi, 0x60
jge 0x10051ffd
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x38]
movzx esi, byte [ebx + ecx*2]
movzx ebx, word [ebp + ecx*2]
mov ecx, edi
mov ebp, 1
sub ecx, dword [esp + 0x10]
mov dword [esp], edx
shl ebp, cl
mov ecx, eax
mov dword [esp + 4], ebp
mov ebp, 1
shl ebp, cl
mov ecx, dword [esp + 4]
mov dword [esp + 0x18], ebp
mov ebp, edx
mov edx, esi
mov esi, eax
mov eax, edx
movzx edx, byte [esp + 8]
neg ecx
shl ecx, 2
mov dword [esp + 0xc], ecx
movzx ecx, byte [esp + 0x10]
shr ebp, cl
mov ecx, dword [esp + 0x18]
add ecx, ebp
mov ebp, dword [esp + 0x1c]
sub ecx, dword [esp + 4]
lea ecx, [ebp + ecx*4]
mov ebp, dword [esp + 0x18]
mov byte [ecx], al
mov byte [ecx + 1], dl
mov word [ecx + 2], bx
add ecx, dword [esp + 0xc]
sub ebp, dword [esp + 4]
jne 0x10052055
mov edx, dword [esp]
lea ecx, [edi - 1]
mov ebx, 1
shl ebx, cl
mov eax, esi
mov ecx, ebx
test ebx, edx
je 0x10052086
lea esi, [esi]
shr ecx, 1
test ecx, edx
jne 0x10052080
test ecx, ecx
je 0x100521d3
lea ebx, [ecx - 1]
and ebx, edx
lea edx, [ebx + ecx]
movzx ecx, word [esp + edi*2 + 0x44]
sub ecx, 1
test cx, cx
mov word [esp + edi*2 + 0x44], cx
jne 0x100520c5
cmp edi, dword [esp + 0x28]
je 0x10052253
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x9c]
movzx ecx, word [ebp + 2]
movzx edi, word [ebx + ecx*2]
cmp dword [esp + 0x24], edi
jae 0x100521c5
mov ebp, dword [esp + 0x34]
and ebp, edx
cmp ebp, dword [esp + 0x30]
je 0x100521c5
mov ebx, dword [esp + 0x10]
mov eax, edi
mov ecx, dword [esp + 0x24]
test ebx, ebx
cmovne ecx, dword [esp + 0x10]
sub eax, ecx
cmp edi, dword [esp + 0x28]
mov dword [esp + 0x10], ecx
jae 0x10052154
mov ecx, eax
mov ebx, 1
shl ebx, cl
mov dword [esp + 0xc], ebx
movzx ebx, word [esp + edi*2 + 0x44]
sub dword [esp + 0xc], ebx
mov ecx, dword [esp + 0xc]
test ecx, ecx
jle 0x10052154
mov ecx, dword [esp + 0x10]
mov dword [esp + 4], edi
mov edi, dword [esp + 0x28]
mov dword [esp + 8], edx
lea esi, [esp + ecx*2 + 0x44]
mov ebx, ecx
mov ecx, dword [esp + 0xc]
jmp 0x10052142
movzx edx, word [esi + eax*2]
add ecx, ecx
sub ecx, edx
test ecx, ecx
jle 0x1005214c
add eax, 1
lea edx, [eax + ebx]
cmp edi, edx
ja 0x10052136
mov edi, dword [esp + 4]
mov edx, dword [esp + 8]
mov ebx, 1
mov ecx, eax
shl ebx, cl
add dword [esp + 0x20], ebx
cmp dword [esp + 0x20], 0x353
ja 0x100522f7
cmp dword [esp + 0x20], 0x24f
ja 0x10052320
mov ecx, dword [esp + 0x1c]
lea esi, [ebp*4]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x30], ebp
lea ecx, [ecx + ebx*4]
mov ebx, dword [esp + 0xa4]
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebx]
mov byte [ecx + ebp*4], al
mov ecx, dword [ebx]
movzx ebx, byte [esp + 0x24]
mov byte [ecx + esi + 1], bl
mov ecx, dword [esp + 0xa4]
mov ebx, dword [ecx]
mov ecx, dword [esp + 0x1c]
sub ecx, ebx
sar ecx, 2
mov word [ebx + esi + 2], cx
add dword [esp + 0x14], 2
mov ebp, dword [esp + 0x14]
jmp 0x10051fc7
xor edx, edx
jmp 0x10052096
cmp dword [esp + 0x98], 1
mov eax, 0x100
mov dword [esp + 0x2c], 0xffffffff
cmovne eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], 0x10070880
mov dword [esp + 0x38], 0x10070800
mov dword [esp + 0x2c], eax
mov eax, 0x1007063e
cmovne eax, dword [esp + 0x3c]
mov dword [esp + 0x3c], eax
mov eax, 0x100705be
cmovne eax, dword [esp + 0x38]
mov dword [esp + 0x38], eax
jmp 0x10051f3b
cmp byte [esp + 0x42], 0
mov eax, 1
je 0x10051f92
jmp 0x10051d3d
cmp byte [esp + 0x43], 0
mov eax, 1
je 0x10051fad
jmp 0x10051d3d
test edx, edx
je 0x1005226f
mov ebx, dword [esp + 0x1c]
lea eax, [ebx + edx*4]
movzx edx, byte [esp + 8]
mov byte [eax], 0x40
mov word [eax + 2], 0
mov byte [eax + 1], dl
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0xa4]
mov ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0xa8]
shl eax, 2
add dword [ebx], eax
xor eax, eax
mov dword [ebp], ecx
jmp 0x10051d3d
mov dword [esp + 0x28], 0xe
lea esi, [esi]
cmp word [esp + 0x46], 0
mov edi, 1
mov eax, dword [esp + 0x28]
jne 0x10051d55
add edi, 1
cmp edi, eax
je 0x10051d55
cmp word [esp + edi*2 + 0x44], 0
je 0x100522b5
movzx eax, word [esp + 0x46]
mov ebx, 2
sub ebx, eax
jmp 0x10051d68
mov dword [esp + 0x28], 0xf
jmp 0x100522a0
mov dword [esp + 0x28], 0xc
jmp 0x100522a0
mov dword [esp + 0x28], 0xd
jmp 0x100522a0
cmp byte [esp + 0x42], 0
je 0x1005216f
mov eax, 1
jmp 0x10051d3d
mov dword [esp + 0x28], 0xa
jmp 0x100522a0
mov dword [esp + 0x28], 0xb
jmp 0x100522a0
cmp byte [esp + 0x43], 0
je 0x1005217d
jmp 0x10052302
mov dword [esp + 0x28], 8
jmp 0x100522a0
mov dword [esp + 0x28], 9
jmp 0x100522a0
mov dword [esp + 0x28], 7
jmp 0x100522a0
mov dword [esp + 0x28], 6
jmp 0x100522a0
mov dword [esp + 0x28], 4
jmp 0x100522a0
mov dword [esp + 0x28], 5
jmp 0x100522a0
mov dword [esp + 0x28], 2
jmp 0x100522a0
mov dword [esp + 0x28], 3
jmp 0x100522a0
mov eax, 0xffffffff
jmp 0x10051d3d